It depends on where you want to put this link. If it is in a UITextView, you just need to enable it.
textView.text = @"Some text with link in it : http://http://stackoverflow.com"; textView.dataDetectorTypes = UIDataDetectorTypeLink;
Learn more about the iOS help library .
Or, if you want to open Safari programmatically:
NSURL *url = [ [ NSURL alloc ] initWithString: @"http://stackoverflow.com" ]; [[UIApplication sharedApplication] openURL:url]; [url release];
If you want to share on Facebook, you need to tell Safari to open a URL that displays a Facebook page that allows the user to share. Here is an example:
NSString *urlString = @"http://stackoverflow.com";
Julien
source share