How to add twitter follow button in my iPhone app?

爱⌒轻易说出口 提交于 2019-12-03 07:17:21

Without plugging into another twitter app or anything you could probably open a URL to do the job.

 - (IBAction)followMeOnTwitter:(id)sender {
    [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"https://twitter.com/intent/user?screen_name=<twitter_screen_name>"]];
 }

Just replace the end of that URL with your twitter account name, and it should open to follow that account in the browser. Be sure to connect your button to "followMeOnTwitter" by including it in your view's .h file.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!