For the life of me I can’t figure out why this isn’t working. The Authorization header seams fine, but for some reason it won’t work. Below is an example.
Base String:
POST&https%3A%2F%2Fapi.twitter.com%2Foauth%2Frequest_token&oauth_callback%3Dhttp%253A%252F%252Flocalhost%252Fdev%252F%26oauth_consumer_key%3DRFr6U9avTvMIqe8AIlbJxw%26oauth_nonce%3D4bee9a52f517fb244406e9a8253ed440%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp%3D1362692958%26oauth_version%3D1.0
Signature:
+dtkMt7QD0cv+kGaEGrqYhOe15Q=
Authorization Header:
Authorization: OAuth oauth_callback=“http%3A%2F%2Flocalhost%2Fdev%2F”, oauth_consumer_key=“RFr6U9avTvMIqe8AIlbJxw”, oauth_nonce=“4bee9a52f517fb244406e9a8253ed440”, oauth_signature_method=“HMAC-SHA1”, oauth_timestamp=“1362692958”, oauth_version=“1.0”, oauth_signature="%2BdtkMt7QD0cv%2BkGaEGrqYhOe15Q%3D"
Request:
array
’oauth_callback’ => string ‘http://localhost/dev/’ (length=21)
‘oauth_consumer_key’ => string ‘RFr6U9avTvMIqe8AIlbJxw’ (length=22)
‘oauth_nonce’ => string ‘4bee9a52f517fb244406e9a8253ed440’ (length=32)
‘oauth_signature_method’ => string ‘HMAC-SHA1’ (length=9)
‘oauth_timestamp’ => int 1362692958
’oauth_version’ => string ‘1.0’ (length=3)
‘oauth_signature’ => string ‘+dtkMt7QD0cv+kGaEGrqYhOe15Q=’ (length=28)
Response:
array
’http_code’ => int 400
’results’ => string ‘’ (length=0)
‘error’ => string ‘’ (length=0)
‘headers’ =>
array
’Content-Length’ => string ‘0’ (length=1)
‘Connection’ => string ‘close’ (length=5)
Anyone have any idea what’s going on? I’m constructing this manually and performing the request with CURL. I do not want to use a 3rd party library which has too much potential to conflict with other installed items.