How to send user to Facebook page on button click

2 Solutions Collect From Internet About “How to send user to Facebook page on button click”

As of the 4.0 update for Facebook, you can jump to pages with this URI schema:


Just make sure you check to make sure that the device you’re working with can respond to it:

[[UIApplication sharedApplication] canOpenURL:[NSURL urlWithString:@"fb://page/{fbid}"]];

Your method might end up looking something like this:

- (IBAction)openFBPage:(id)sender {
    if ([[UIApplication sharedApplication] canOpenURL:[NSURL urlWithString:@"fb://page/{fbid}"]]) {
        [[UIApplication sharedApplication] openURL:[NSURL urlWithString:@"fb://page/{fbid}"]];
    } else {
        NSLog(@"Facebook isn't installed.");
        // or do the sensible thing and openURL the HTTP version of the page in safari

… and you’d link the above method with your button in Interface Builder.

You need to download the FacebookSDK and follow the steps that are described over there. Check out this page

Hope helps…