Question

I have a native iOS App that I would like to share a Graph & Text to Facebook from.

I don't have any experience on this so just wanted to get your thoughts. I've just checked 'ShareKit' and am not sure if it is the way to go. I think there is a native 'Share' option for iOS as well. So which one is better?

Any ideas, docs, keywords, links?

Thanks, Ervin

Was it helpful?

Solution

You can use Apple's SLComposeViewController Class which includes sharing text and pictures to Facebook, Twitter and Weibo. This class is actually one of the easier ones to understand and learn.

There is a Ray Wenderlich tutorial on this class on how to post to Twitter but you can very easily change this line of code to go from Twitter to Facebook.

SLComposeViewController *tweetSheet = [SLComposeViewController composeViewControllerForServiceType:SLServiceTypeTwitter];

to:

SLComposeViewController *tweetSheet = [SLComposeViewController composeViewControllerForServiceType:SLServiceTypeFacebook];

Also try Google for 'SLComposeViewController tutorial' if you don't like the above one.

OTHER TIPS

If you plan to target more services, epecially those not supported in ios natively, ShareKit can save you a LOT of time. Even for social.framework-included sharers ShareKit can have advantages. E.g. Customizable ui, fetching user account info or possibility to share video, or larger images (the latter on Twitter.

If you just need simple send on Facebook or Twitter, social.framework is the way to go.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top