How to open facebook and Twitter on a specific page in iOS

advertisements

Which is the line of code to open facebook and twitter displaying a given page?

tried with this for Facebook

NSURL *target = [[NSURL alloc] initWithString:@"fb://profile/WindyCityCrossFit"]; [[UIApplication sharedApplication] openURL:target];

but it just taks me to my news feed page. Twitter haven't given me any results either.


Facebook:

NSURL *url = [NSURL URLWithString:@"fb://profile/130936560286785"]; [[UIApplication sharedApplication] openURL:url];

Twitter:

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"twitter://user?screen_name=MyTwitterID"]];