Problem with posting the message using php
I have successfully come up to the access_token
step along with final oauth_token
and oauth_token_secret
values.
Now I'm trying to access the Post method given by Yammer API with following request :
https://www.yammer.com/api/v1/messages/? body=MyMessage& oauth_consumer_key=Myconsumerkey& oauth_nonce=1825bbc0f0a2875eb94bdb4d51c0638b& oauth_signature=JzG4DCWxuP%2B7xT7u3tFZ2zCC8%2BI%3D& oauth_signature_method=HMAC-SHA1& oauth_timestamp=1257761059& 开发者_StackOverflowoauth_token=Myfinaloauthtoken& oauth_version=1.0
But I'm getting "Invalid OAuth signature" error.
Can somebody help me in this.
Looks like you are missing %26 from the end of your signature. I realise this was an old post but did you manage to get a Yammer post message working?
You seem to have some strange characters in the oauth_signature:
JzG4DCWxuP %2B 7xT7u3tFZ2zCC8 %2B I %3D &
Check where those are coming from.
Tricky to say without seeing the code you're running, but check these things:
- are the post body parameters all included in the key/values use to generate the signature?
- are you including only the base URL in the signature base string? (i.e. the bit upto, but not including the '?')
- are you including the HTTP method (
POST
in this case) in the signature base string?
精彩评论