简体   繁体   中英

ios 6: prompt user to log into facebook

I'm using UIActivityViewController to use facebook integration within my app. I've observed that in order for the Facebook option to be displayed in the list of displayed options, the user needs to be logged into Facebook on their device in the settings prior to entering that UIActivityViewController.

I'd like to prompt the user to log into Facebook and allow my app access to their account prior to invoking the UIActivityViewController. Is there a way to prompt the user to log into Facebook on their device (I guess I'm looking for a redirect or hook to the Settings app, with a callback)?

Note: I'd like to avoid using the Facebook SDK, and use the purely Apple supplied framework.

It's not possible with UIActivityViewController .

But you can achieve same function via SLComposeViewController .

I created a forked project OWActivityViewController that implement the same function as Apple's built-in Photos app's share action sheet through SLComposeViewController .

OWActivityViewController use the purely Apple supplied framework, compatible with iOS 5, hope this could help you somehow.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM