Search code examples
iphoneios4twittermgtwitterengine

Error when using Twitter to log in to my iPhone app


I am using Twitter login to enter in my app. But when I click on the Twitter button, the Twitter page opens, but I get the following error:

WHOA there!!! This page is no longer valid.it looks like someone already used the token information you provide.please return to the site tht sent you to this page or try again. it was an probably an honest mistake.

-(void)twitterclick 
{ 
SA_OAuthTwitterEngine *_engine = [[SA_OAuthTwitterEngine alloc] initOAuthWithDelegate:self]; engine.consumerKey=[[NSString alloc]init];
 _engine.consumerSecret=[[NSString alloc]init];
 _engine.consumerKey = @"App consumer key";
 _engine.consumerSecret = @"App Consumer secret"; 
UIViewController *controller = [SA_OAuthTwitterController controllerToEnterCredentialsWithTwitterEngine: _engine delegate: self]; 
if (controller) 
[self presentModalViewController:controller animated:YES];
 } 

How might I resolve this?


Solution

  • I had the same problem... it turned out to be related to the system time on my device.

    Not sure how it happened.. but after changing the date, it worked.