0

Upon tap of a button, I am trying to send the user to a Facebook page.

I am testing with a random page like this, which exists: http://facebook.com/WorldwideCollection

Here is how I attempt to launch the page in Facebook app:

NSURL *url = [NSURL URLWithString:@"fb://page/WorldwideCollection"];
if ([a canOpenURL:url]) {
    [a openURL:url];
    return;
}

Facebook app is logged in and opens. But all I see is my own timeline. It does not direct the user to the page as requested. Is there a different way of doing it?

iamjustaprogrammer
  • 1,634
  • 2
  • 17
  • 34

3 Answers3

1

You need to use profile with the Facebook id for the page :

fb://profile/(fbid)

GuybrushThreepwood
  • 5,598
  • 9
  • 55
  • 113
0

You need to use facebookID of your page to visit like this

 //Stackoverflow Page
 fb://page/11239244970
Fran Martin
  • 2,369
  • 22
  • 19
0

Check this link, this was answered on stackoverflow

Especially check these lines of code.

NSURL *urlApp = [NSURL URLWithString:@"fb://profile/****123****"];
[[UIApplication sharedApplication] openURL:urlApp];
Community
  • 1
  • 1
zaheer
  • 893
  • 13
  • 27