I am working on an application where I need to put a button that redirects users to a specific facebook page. Typically, clicking on this button should open the profile in the facebook application or in the navigator if facebook is not installed. Plus, I would like to do the same with the twitter page.
I would like to know how to do this.
Thanks so much for your time.
URL. Facbook fb://, , fb://profile/zuck, Mobile Safari Facebook . Facebook , - .
fb://
fb://profile/zuck
, URL, .
::
Twitter, Twitter, twitter:// tweetbot://, https://twitter.com/#!/<# User Name #>
twitter://
tweetbot://
https://twitter.com/#!/<# User Name #>
@SkylarSch, Facebook, Mobile Safari:
NSURL *fbNativeAppURL = [NSURL URLWithString:@"fb://page/yourPageIDHere"]; // Check to make sure URL can be opened on device (whether the user has the Facebook app installed) if ( [[UIApplication sharedApplication] canOpenURL:fbNativeAppURL]) { [[UIApplication sharedApplication] openURL:fbNativeAppURL]; } // Otherwise, just open it in the browser { [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"http://www.facebook.com/yourPageIDHere"]]; }
, Facebook . , Facebook : URL https://www.facebook.com/pageName : http://findmyfacebookid.com URL-, Facebook, url @ "fb://profile/profileID"
!
{edit} , {/edit}
iPhone iPhone URL fb://. , , , fb://profile/{page or profile id} iphone ( ).
fb://profile/{page or profile id}
I found that to this question , which has been accurate since version 3.4 (it is currently 4.0, but I think most of them are still valid)