Open link to Facebook page from iOS app

You have to use the facebook ID for the given page rather than the vanity URL. To get the pages ID, enter your page’s vanity name at the following URL and copy the value for “id”:

Once you have the id, you can set up the method to check if FB is installed using the canOpenURL method and serve the appropriate content for both states:

NSURL *facebookURL = [NSURL URLWithString:@"fb://profile/113810631976867"];
if ([[UIApplication sharedApplication] canOpenURL:facebookURL]) {
    [[UIApplication sharedApplication] openURL:facebookURL];
} else {
    [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@""]];

Leave a Comment