使用IBAction从我的应用程序中打开本机Twitter应用程序

时间:2012-05-12 12:08:03

标签: objective-c xcode twitter ibaction url-scheme

我想将natvie Twitter App应用到我的iOS应用程序中。 我已经通过使用URL Schemes在Facebook上完成了这项工作。但我无法为Twitter找到这样的东西。

对于Facebook,我用过:

-(IBAction)facebook:(id)sender {
       [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"fb://"]];
}

但是当我尝试使用

@"Twitter" or @"twitter" or @"tw"
没有任何反应。 如果你们能帮助我,那会很棒。我没有在Interweb中找到任何东西:/ 如果有类似的东西,请:)

提前致谢:)

1 个答案:

答案 0 :(得分:18)

你有没有尝试过:

twitter://

例如:

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"twitter://user?screen_name=username"]];
相关问题