问题
I am using Twitter+OAuth which uses MGTwitterEngine and SAOAuthTwitterEngine.
My app works great in the simulator, and on iPhone / iPod, I've only got iOS 5 to test on devices but I've set up my code so that if there is no twitter account in the system, or the app cannot use it, it uses this "fallback".
The problem is I am getting the following error message:
"The request token for this page is invalid. [...]"
Please note that this is before we even get to OAuth or anything API... This occurs in the modal web view that pops up to "authorise" the application with your login.
As I said, works great everywhere although I can run into this from time to time on the iPhone .
Please help.
PS: I am aware of other posts such as
https://dev.twitter.com/discussions/4849 or OAuth access Token fails while accessing twitter from iOS 5
But it seems I can't find a fix, I already made sure I am using https
回答1:
It seems it's a Twitter issue, having not changed any code and it working in certain conditions one day and the next day being different, working on and off I can only assume this is something to do with Twitter itself.
回答2:
Hey guys try this reset the request token - requestRequestToken set new request token
[engine requestRequestToken];
UIViewController *controller = [[SA_OAuthTwitterController controllerToEnterCredentialsWithTwitterEngine:engine delegate:self] retain];
[delegate presentModalViewController: controller animated: YES];
Note: It increase the time of loading authentication page in web view
I think it will help....
来源:https://stackoverflow.com/questions/9396323/twitter-request-token-invalid-on-ios