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

Con*_*cob 4 twitter xcode objective-c url-scheme ibaction

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

对于Facebook,我用过:

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

但是当我尝试使用时

@"Twitter" or @"twitter" or @"tw"
Run Code Online (Sandbox Code Playgroud)

什么都没发生.如果你们能帮助我,那会很棒.我没有在Interweb中找到任何东西:/如果有类似的东西请:)

提前致谢 :)

Bla*_*zer 18

你试过了吗:

twitter://
Run Code Online (Sandbox Code Playgroud)

例如:

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"twitter://user?screen_name=username"]];
Run Code Online (Sandbox Code Playgroud)