Possible Duplicate:
Custom URL scheme for new Facebook iOS app
I have a Facebook button in my iPhone app. When it gets touched I want it to go to the Facebook iPhone app and load a facebook page if the Facebook iPhone app is on the device, if not, then go to Safari and go to this facebook page. The code below takes you to the facebook app, but it just goes to the feed. But it works how I want it to when the Facebook iphone app is not installed
This code does get run.
How can I go straight to the page from a click of the button?
NSString *urlStr = @"https://www.facebook.com/MYFACEBOOKPAGE";
NSURL *url = [[NSURL alloc] initWithString:urlStr];
if (![[UIApplication sharedApplication] openURL:url]) NSLog(@"%@%@",@"Failed to open url:",[url description]);