Invalid signature when getting the access token from Flickr using OAuth
I'm implementing a Flicker Client for 开发者_如何转开发the IPhone, and I am using OAuth
I managed to request the tokens successfully as well as redirecting the user to the authentication page,
My problem is when I try to ask for the access token I receive:
oauth_problem=signature_invalid Here's my header:
header OAuth realm="",
oauth_callback="oob",
oauth_consumer_key="XXXXX",
oauth_token="XXXX",
oauth_verifier="XXXX",
oauth_signature_method="HMAC-SHA1",
oauth_signature="XX",
oauth_timestamp="1309773699",
oauth_nonce="XXX",
oauth_version="1.0"
and here's my Base String:
POST&http%3A%2F%2Fwww.flickr.com%2Fservices%2Foauth%2Faccess_token&
oauth_consumer_key%3DXXXX%26
oauth_nonce%3DXXXX%26
oauth_signature_method%3DHMAC-SHA1%26
oauth_token%3DXXXX%26
oauth_timestamp%3D1309773699%26
oauth_verifier%3DXXXX%26
oauth_version%3D1.0
Thank you in advance,
The problem was solved by removing the callback attribute from the header. as the signature is regenerated from the header and then compared with the base string.. So, make sure that the header contains the same information as the base string.
I found that by comparing my header with an example from the Flicker API..
精彩评论