Answered by:
implementing social integration in my app

Question
-
i want to implement multiple social network share feature in my app. i.e. say i have an image i want the ability to provide the user with option to choose on whichever website the choose, they can upload the picture with a single click.
i used checkboxes but couldn't successfully integrate twitter, fb, tumbler etc together?
suggest a better way to do this!
Saurabhk
Thursday, October 2, 2014 10:32 PM
Answers
-
but i am asking about sharing things on social networking sites like twitter , facebook etc.
That is what the share source contract does: the app provides data and the user can pick any share target to send it to. Common share targets include email, twitter, and facebook.
Here's a screen capture sharing from the News app on my computer. The News app doesn't know anything about Facebook or Twitter, but since I have Facebook and Twitter apps (as well as the People app) I can share to them:
By using the share contract the app doesn't need to specifically know about twitter and facebook. The twitter and facebook share target apps will take care of that. If the user starts using a new social networking site then installing an app for that site will automatically enable your app to share to it, without your app needing to add any such code.
It's a fairly reasonable assumption that somebody who cares about Twitter or Facebook will have a Twitter or Facebook app installed, or will have the People app connected to them.
Your other option is to call Twitter and Facebook API directly from your app, but that is more work and less functional for simple updates.
--Rob
- Marked as answer by Saurabh_kr Friday, October 3, 2014 6:17 PM
Friday, October 3, 2014 5:10 PMModerator
All replies
-
This is what the Sharing contract is for. The app can provide the data without caring where it is shared to. The user can choose to share it to whichever services the user has installed.
See Sharing content and Quickstart: Sharing content .
Thursday, October 2, 2014 11:17 PMModerator -
yes, this is good.
but i am asking about sharing things on social networking sites like twitter , facebook etc.
Saurabhk
Friday, October 3, 2014 6:29 AM -
The most flexible way is to create another app that receives your data, and sends it to the social network. Your current app then just has to share stuff through the Sharing contract that Rob mentioned.
You could develop such a sharing content target yourself, but it's probably easier to just reuse an existing one, such as this one (there are also free ones in the store).
Friday, October 3, 2014 2:26 PM -
but i am asking about sharing things on social networking sites like twitter , facebook etc.
That is what the share source contract does: the app provides data and the user can pick any share target to send it to. Common share targets include email, twitter, and facebook.
Here's a screen capture sharing from the News app on my computer. The News app doesn't know anything about Facebook or Twitter, but since I have Facebook and Twitter apps (as well as the People app) I can share to them:
By using the share contract the app doesn't need to specifically know about twitter and facebook. The twitter and facebook share target apps will take care of that. If the user starts using a new social networking site then installing an app for that site will automatically enable your app to share to it, without your app needing to add any such code.
It's a fairly reasonable assumption that somebody who cares about Twitter or Facebook will have a Twitter or Facebook app installed, or will have the People app connected to them.
Your other option is to call Twitter and Facebook API directly from your app, but that is more work and less functional for simple updates.
--Rob
- Marked as answer by Saurabh_kr Friday, October 3, 2014 6:17 PM
Friday, October 3, 2014 5:10 PMModerator