Open Facebook app from other app

后端 未结 1 647
误落风尘
误落风尘 2021-02-04 14:01

Is there a way to open the Facebook app from my own application?

For example, I\'m using the Facebook-api to post something on the logged in users wall. When I get a cal

相关标签:
1条回答
  • 2021-02-04 14:15

    For the iphone, you can launch the Facebook app if installed by using a url starting with fb://

    More information can be found here: http://iphonedevtools.com/?p=302 also here: http://wiki.akosma.com/IPhone_URL_Schemes#Facebook

    Stolen from the above site:

    • fb://profile – Open Facebook app to the user’s profile
    • fb://friends – Open Facebook app to the friends list
    • fb://notifications – Open Facebook app to the notifications list (NOTE: there appears to be a bug with this URL. The Notifications page opens. However, it’s not possible to navigate to anywhere else in the Facebook app)
    • fb://feed – Open Facebook app to the News Feed
    • fb://events – Open Facebook app to the Events page
    • fb://requests – Open Facebook app to the Requests list
    • fb://notes - Open Facebook app to the Notes page
    • fb://albums – Open Facebook app to Photo Albums list

    To Launch:

    NSURL *theURL = [NSURL URLWithString:@"fb://<insert function here>"];
    [[UIApplication sharedApplication] openURL:theURL];
    
    0 讨论(0)
提交回复
热议问题