How to integrate twitter api in iphone SDK in such a way that all of its functionality is on one view
In my iphone app, I am having a twitter page where the user can update his/her status.
Here, the problem is that the user has to click the button on view (say view A) and go to next view(say view B).
On that view (view B), the modal 开发者_运维技巧view then appears where in the user can add his authenication details and then submit.
Now I want that the modalview should appear on the that view (view A) rather than switching to another view (view B).
What should I do?
Please Help and Suggest
Thanks
The functionality can be added on View "A" itself. Once you finish up adding required Framework and classes you can add this code in the button action method.
-(IBAction) showTwitter:(id)sender{
UIViewController *controller = [SA_OAuthTwitterController controllerToEnterCredentialsWithTwitterEngine: _engine delegate: self];
if (controller) {
[self presentModalViewController: controller animated: YES];
}
else {
//comes here when user has already keyed in His credentials
//can add code here
}
}
This link might be of help to you. http://mobile.tutsplus.com/tutorials/iphone/twitter-api-iphone/
精彩评论