Am developing an iPhone app. From my app user can to follow my twitter account
. I want to add the Follow twitter button in my app
. When the user press the button make the user to follow my twitter account. Before i didn't used any twitter api and twitter functionality
so am struggling to make this. Can you please help me to follow another twitter user account from the app itself? Thanks in advance.
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.
来源:https://stackoverflow.com/questions/10379201/how-to-add-twitter-follow-button-in-my-iphone-app