我试过使用下面的代码,但它一直让用户显示网站,我需要它将它们带到iPhone,iPad和iPod上的应用程序!如何制作一个操作按钮,让用户访问iOS应用程序中的Facebook应用程序?
- (IBAction)fbIconGo:(id)sender {
NSURL *fbURL = [[NSURL alloc] initWithString:@"https:facebook.com/numberHERE"];
// check if app is installed
if (! [[UIApplication sharedApplication] canOpenURL:fbURL]) {
// if we get here, we can't open the FB app.
fbURL = [[NSURL alloc] initWithString:@"https:facebook.com/NUMBER HERE"];; // direct URL on FB website to open in safari
}
[[UIApplication sharedApplication] openURL:fbURL];
[从其他应用中打开Facebook应用](http://stackoverflow.com/questions/4725815/open-facebook-app-from-other-app) – n00bProgrammer