5

I'm trying to open my facebook fan page in the fbook app from a web page in safari.

I found What are all the custom URL schemes supported by the Facebook iPhone app?

and I've tried setting the link to

  • fb://pages/[pageid]
  • fb://pages/?id=[pageid]
  • fb://page/[pageid]
  • fb://page/?id=[pageid]
  • fb://profile/[pageid]

They all open the app( of course ) but not at my page, I feel like i'm close but I've been poking round at it for a while now, any help much appreciated.

Community
  • 1
  • 1
cromac
  • 133
  • 2
  • 4
  • it's not a tab i'm after, just the page itself. This does open in both versions, and i can do it on the browser, but its the app that is really key. Mostly because iphone users tend to be logged in via the app rather than their browser – cromac Oct 05 '11 at 10:56

2 Answers2

10

To open facebook page in facebook app you should:

1)Find uid of your page (it can be done for example by looking at source code of your facebook page)

I got the following fragment from the source code of the page: http://www.facebook.com/Innova.et.Bella

{"text":"Innova et Bella","type":"ent:page","uid":73728918115}

N.B.: To check if uid is correct substitute uid for pagename: http://www.facebook.com/73728918115 This url should open your page.

2) When the uid is found end is correct use this code:

NSURL *urlApp = [NSURL URLWithString:@"fb://profile/73728918115"];
[[UIApplication sharedApplication] openURL:urlApp];

This code will open you page within facebook app. N.B.: Do not forget to check if the facebook app exists( or more precisely that the url can be opened) using: if ([[UIApplication sharedApplication] canOpenURL:urlApp]) otherwise open it in Safari.

Alexey
  • 7,127
  • 9
  • 57
  • 94
-2

Facebook tab pages do not displayed in the mobile or app version of facebook. Not possible.

Ann K
  • 49
  • 2
  • 9
  • 1
    it's not a tab i'm after, just the page itself. This does open in both versions, and i can do it on the browser, but its the app that is really key. Mostly because iphone users tend to be logged in via the app rather than their browser – cromac Oct 10 '11 at 08:49