Reputation: 79
When I open a facebook url using 'openURL', in the form of "http://www.facebook.com/SomePage", it gets opened by the Facebook app, and it leads to a broken page (most of the screen is blank), or to the user's "timeline" (depending on the device and version of the app). Is there any way to force the URL to go to Safari? I don't mind that the facebook app takes over the URL, but if it doesn't know how to handle it, I'd rather have Safari do it.
Upvotes: 6
Views: 1327
Reputation: 4920
There is a bug/feature with the latest facebook app, when you use the url with shortname it instead opens the last page or the news feed of the user. You need to use the user/group id.
You can find it using the graph API https://graph.facebook.com/SHORT_NAME under the propertie "id"
example :
https://www.facebook.com/stackoverflowpage
https://www.facebook.com/11239244970
just paste page URL here http://findmyfacebookid.com/ and you will get ID for page.
Upvotes: 2
Reputation: 1359
As pj4533 suggested, removing the 'www.' from the front of the url fixes the issue. Adding this as an answer so it can be marked as answer and more obvious for others.
Upvotes: 4
Reputation: 635
Please let me know does this work for you, because it is working fine for me...
[[UIApplication sharedApplication] openURL:[NSURL URLWithString: @"http://www.facebook.com/"]];
Upvotes: 0