Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Open Facebook app from other app

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 call back that the post was successfully added I would like to open the Facebook app (if application is installed on the device) on the users wall to show them their post is there.

Answers for iPhone or Android or both would be much appreciated.

like image 726
sanna Avatar asked Jan 18 '11 15:01

sanna


People also ask

Can Facebook access other Apps?

Other information is not public and an app, website or game can access it only if you choose to share it with the app, website or game when you log in with your Facebook account.


1 Answers

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];
like image 182
theChrisKent Avatar answered Oct 03 '22 08:10

theChrisKent