title: objective-c : Twitter login error on iPad : Whoa there
body: <p><img src="https://i.stack.imgur.com/rXboJ.png" alt="enter image description here">I've been using the classic Ben Gottlieb Twitter Open Source project to create a twitter login for iPad.</p>
  
  <p>My code to instantiate the engine and display the login controller is:</p>
  
  <pre><code>if (!_engine) {
          _engine = [[SA_OAuthTwitterEngine alloc] initOAuthWithDelegate:self];
          [_engine setConsumerKey:@"kConsumerKey"];
          [_engine setConsumerSecret:@"kConsumerSecret"];
      }
  
      if (![_engine isAuthorized]){
          UIViewController *controller = [SA_OAuthTwitterController controllerToEnterCredentialsWithTwitterEngine:_engine delegate:self];
          if (controller){
              if ([controller respondsToSelector:@selector(setModalPresentationStyle:)] == YES) {
                  controller.modalPresentationStyle = UIModalPresentationFormSheet;
              }
              [self presentModalViewController:controller animated:YES];
              return;
          }
  
      }
  </code></pre>
  
  <p>In addition, I set the URLS for SA_OAuthTwitterEngine to https:</p>
  
  <pre><code>self.requestTokenURL = [NSURL URLWithString: @"https://twitter.com/oauth/request_token"];
  self.accessTokenURL = [NSURL URLWithString: @"https://twitter.com/oauth/access_token"];
  self.authorizeURL = [NSURL URLWithString: @"https://twitter.com/oauth/authorize"];
  </code></pre>
  
  <p>and my TWITTER_DOMAIN in MGTwitterEngine.m has been changed to:</p>
  
  <pre><code>#define TWITTER_DOMAIN          @"api.twitter.com/1"
  </code></pre>
  
  <p>Running this code in the simulator for both iPhone and iPad works like a charm. <strong>HOWEVER, whenever I test this code on an iPad device, I'm thrown this error:</strong></p>
  
  <blockquote>
    <p>Whoa there! The request token for this page is invalid. It may have
    already been used, or expired because it is too old. Please go back to
    the site or application that sent you here and try again; it was
    probably just a mistake</p>
  </blockquote>
  
  <p>(Screenshot attached).</p>
  
  <p>Any suggestions on how to get the standard login screen to appear will be greatly appreciated</p>