title: IOS twitter login get request_token error
body: <p>I'm trying to get <code>request_token</code> from <a href="https://api.twitter.com/oauth/request_token" rel="nofollow">https://api.twitter.com/oauth/request_token</a>. But I always got following error.</p>
  
  <blockquote>
    <p>"Failed to validate oauth signature and token"</p>
  </blockquote>
  
  <p>Below is my signature_base:</p>
  
  <pre><code>POST&amp;https%3A%2F%2Fapi.twitter.com%2Foauth%2Frequest_token&amp;oauth_callback%3Dhttp%3A%2F%2Fwww.google.com%26oauth_consumer_key%3DydxYUl45Mleo5LNyoExnAF4mY%26oauth_nonce%3D9C918901-EF8A-4B84-BDF5-B7E754C46397%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp%3D1415174195%26oauth_version%3D1.0
  </code></pre>
  
  <p>The auth header generated is:</p>
  
  <pre><code>{
      Authorization = "OAuth oauth_version=\"1.0\", 
      oauth_nonce=\"9C918901-EF8A-4B84-BDF5-B7E754C46397\", 
      oauth_signature_method=\"HMAC-SHA1\", 
      oauth_consumer_key=\"ydxYUl45Mleo5LNyoExnAF4mY\", 
      oauth_timestamp=\"1415174195\", 
      oauth_callback=\"http://www.google.com\",
      oauth_signature=\"j6k3CY4Fr40SKAWiG%2B5%2BwkErdYc%3D\"";
  }
  </code></pre>
  
  <p>I verified the signature with my secret key and it's correct. Really can't figure out where the problem is...</p>
  
  <p>One clue is that when <code>oauth_callback</code> is not used at all, I'm able to get request token... Please help!</p>
  
  <p>Thanks,
  Lee</p>
  
  <p><strong>Edit</strong>:
  If I don't use <code>oauth_callback</code>, I'm able to get request token and the callback I set in dev twitter website is used. However, I can't set it to URL Scheme of my app since it's not valid url... </p>