I'm trying to make a widget for my home page which will aut开发者_如何学编程omatically pull from a yammer feed, much like a desktop client, using cURL (PHP). I can't find any examples anywhere, though. Has anyone managed to get through OAuth verification this way?
I'm working on something similar, will answer you more thoroughly later, though here is a brief.
Once you requested both the consumer-key and consumer-secret, make a request to https://www.yammer.com/oauth/request_token, I could not get it to work with HMAC-SHA1 so use PLAINTEXT. The oauth_signature is a the consumer_secret with & appended to it : http://oauth.net/core/1.0/#anchor22
With oauth_token and oauth_token_secret make a request to https://www.yammer.com/oauth/request_token with the oauth_token
You will get a code to authorize your application, this is the oauth_verifier
Now make another request to https://www.yammer.com/oauth/authorize with the unathorized_token
Finally make a request to https://www.yammer.com/oauth/access_token with your access token...
Reading these was useful:
http://github.com/lemonad/python-yammer-oauth http://github.com/psanford/emacs-yammer
well here is the working example http://www.tutorialjinni.com/2011/04/yammer-api-example.html with source code.
精彩评论