Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

RagingGoat

macrumors 6502
Original poster
Jun 21, 2010
307
15
I have an app that has a table view with a list of Facebook pages. When the user selects a row it should open the page in the Facebook app and if the user doesn't have the app installed it will open the page in Safari. It will open in Safari fine but when it opens in the FB app it says "The page you requested was not found". I'm doing the same thing with some Twitter pages and all of those work just fine.

Here is my FB code:

Code:
NSURL *facebookURL2 = [NSURL URLWithString:@"fb://profile/403322143067515"];
    NSURL *safariURL2 = [NSURL URLWithString:@"https://facebook.com/KYRoadsideFarmMarkets"];


if (indexPath.row == 1)
    {
        if ([[UIApplication sharedApplication] canOpenURL:facebookURL2])
        {
            [[UIApplication sharedApplication] openURL:facebookURL2];
        }
        else
        {
            [[UIApplication sharedApplication] openURL:safariURL2];
        }
    }

Any ideas?
 

RagingGoat

macrumors 6502
Original poster
Jun 21, 2010
307
15
How do you know if the Facebook URL is correct? ;)

I got the Facebook ID from the page so I know it's right. I've also tried fb://page/403322143067515 but that didn't work, plus everything I've found online suggests using profile anyway.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.