简体   繁体   中英

How can i open facebook when facebook app is not logged in my iPhone

If facebook application is logged, page will be opened when executing this code and else if i am disconnected from facebook app on my iPhone when executing this code, i will be redirected to the facebook app to login then after connecting app facebook is no redirected to the page !

NSURL *fbNativeAppURL = [NSURL URLWithString:@"fb://page/yourPageIDHere"]
[[UIApplication sharedApplication] openURL:fbNativeAppURL]

In iOS 7 they have removed the redirecting to settings page . Me also tried a lot but not succeeded. So I have used FBGraph api for login .

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