We’re having the same problem, everything was working fine for a couple of months until we started getting 301 response using http calls so we changed them to https, but now all we get is “Failed to validate oauth signature and token”, I’ve tried making a number of changes to the header, but nothing helps. This is the php code:
$ch = curl_init();
curl_setopt($ch, CURLOPT_HTTPHEADER, $_h);
curl_setopt($ch, CURLOPT_URL, ‘https://twitter.com/oauth/request_token’);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$resp = curl_exec($ch);
the dump of $_h is below, this worked fine before, and like I’ve said I’ve tried a number of different variations of this now, removing realm, removing the Expect: value, removing Authorization:, etc…
Array ( [0] => Expect: [1] => Authorization: OAuth realm="/oauth/request_token",oauth_consumer_key=“RXutBKZVrIjeDkzxxzRAHQ”,oauth_token=“11058162-Oae0l0mCoAS40ZkNZ0PFRy6mSj8jjO7byUGwL6AWg”,oauth_nonce=“1e61683d23c2b9cdcdf7ed364ee0cf2e”,oauth_timestamp=“1361460752”,oauth_signature_method=“HMAC-SHA1”,oauth_version=“1.0”,oauth_callback=“http%3A%2F%2Frfdove.com%2Fmobile.php%2Foauth%2Ftwitter.html”,oauth_verfier="",oauth_signature=“9N7GdvhAT6ISDMfcLhhTmoHfeYY%3D” )