21

Does anyone know what the custom URL scheme is to open a Facebook page in their new iOS app. I was using fb://page/PAGE_ID however this doesn't seem to be working in the recently updated Facebook iOS app, it just opens the app but doesn't go to the required page.

Kate Gregory
  • 18,808
  • 8
  • 56
  • 85
nicktones
  • 871
  • 1
  • 9
  • 22
  • http://handleopenurl.com/ provides info on tons of custom schemes. They refer you to http://iphonedevtools.com/?p=302 for fb scheme which has much info. – Rory Sep 13 '13 at 12:23

5 Answers5

26

I got this answer at developer.facebook.com:

Replace the word page with profile and it will work. Your new statement will be:

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"fb://profile/247377102029332"]];
sabadow
  • 5,095
  • 3
  • 34
  • 51
BSevo
  • 743
  • 5
  • 13
18

Use https://graph.facebook.com/YOUR_USERNAME to get your page ID.

In your iOS app use: fb://profile/[your ID] and the facebook app will open to your page.

Ron
  • 3,055
  • 1
  • 20
  • 21
Romano401
  • 642
  • 8
  • 11
14

The URL scheme for the iOS Facebook application is:

fb://profile/(fbid)

Mick MacCallum
  • 129,200
  • 40
  • 280
  • 281
6

Same problem here. fb://page/PAGE_ID is not working anymore. Note that fb://profile/(fbid) wasn't working properly on Facebook 4.x returning a "corrupted" page in both iPad and iPhone. Instead, fb://profile/(fbid)/wall in Facebook 4.x worked well when using an iPad but didn't work with an iPhone.

fb://page/PAGE_ID was the only option that worked on both iPhone and iPad, based on my experience.

I used to use http://wiki.akosma.com/IPhone_URL_Schemes as reference, but it's currently down...

Nicholas
  • 61
  • 2
  • It's annoying that they don't document this. Well thinking I may just open safari rather than the app, as it seems this will give the most consistent experience across iPhone and iPad. Shame. – nicktones Aug 27 '12 at 14:38
  • 2
    I tried using fb://page/{{PAGE_ID}} and it failed, but using fb://profile/{{PAGE_ID}} worked. – coolaj86 Apr 02 '13 at 17:25
  • It worked for me too, but making action such as subscribing the page/liking it didn't work/wasn't available, Have you managed doing any of the above? – Ranco May 04 '13 at 12:56
  • @CoolAJ86 Do you got any work around to handle your issue. Actually in my case the fb url is received from our custom cms which is consumed for iOS and Android. For Android only page is working and for iOS only profile is working. – Naveen Shan May 01 '15 at 05:40
-4

A custom URL scheme is a mechanism through which third-party apps can communicate with each other. It doesn't allow you the provision to open a page in that particular application. It just fires an event to bring the called Application to the foreground. Going through this documentation would further clear your doubts.

The new Facebook app is built using Objective-C as against previous once in HTML5 which used to support URL scheme mechanism. This link gives a hint on that.

http://techcrunch.com/2012/08/23/facebook-for-ios-faster/

Vimal Venugopalan
  • 4,091
  • 3
  • 16
  • 25
  • Actually it does, or at least did. A Facebook fan page can be opened via a URL. Or at least it could before Facebook updated their app. Many apps have URL schemes available to do this kind of thing. Twitter for example has a URL scheme that allows the app to be opened and then a status or user profile to be displayed. Check this question for more info - http://stackoverflow.com/questions/10416338/open-a-facebook-link-by-native-facebook-app-on-ios – nicktones Aug 25 '12 at 22:12
  • 1
    checkout similar problem solution http://alexandsoftware.blogspot.in/2012/05/ios-app-url-schema.html – Vimal Venugopalan Aug 25 '12 at 22:25
  • Thanks for the link, some good information there, however it doesnt solve my problem. The link I described above was working for me before Facebook updated their iOS app. I'm trying to find out if the URL scheme has changed since then or if the ability to launch the app to a FB fan page has been removed. – nicktones Aug 26 '12 at 00:05
  • I guess the new Facebook app is close to the iOS6 native Facebook integration app. So there might be some changes which would not allow the URL scheme mechanism – Vimal Venugopalan Aug 26 '12 at 04:29
  • There have been changes yes. It's wrong to describe the FB iOS integration as an app though. – nicktones Aug 26 '12 at 13:12