Im working with google portable contacts API. I need to allow my web app to import contact list from google contacts.
The process is a 3 legged one where the app need to OAuthGetRequestToken, OAuthAuthorizeToken and OAuthGetAccessToken.
I've successfully completed the requestToken and authorizeToken but im stuck with getAccessToken. I got no error but im not receiving any contact list from google either.
my comsumer key and secret is "anonymous"
The sample request when requesting an access is as follows:
POST /accounts/OAuthGetAccessToken HTTP/1.1
Host: www.google.com
Content-Type: application/x-www-form-urlencoded
Authorization: OAuth
oauth_consumer_key="example.com",
oauth_token="CKF50YzIHxCT85KMAg",
oauth_verifier="fERNOO3NfWph90CPCeIutmFA",
oauth_signature_method="RSA-SHA1",
oauth_signature="wOJIO9A2W5mFwDgiDvZbTSMK%2FPY%3D",
oauth_timestamp="137131200",
oauth_nonce="4572616e48616d6d65724c61686176",
oauth_version="1.0"
my Q is, do i need to generate a new signature or do i use the same one from getRequestToken?
If i need to generate a new token开发者_如何学JAVA, what should it be??
Is POST the same as GET in php curl? if not how should i do it??
As the data between each POST will be different they will have different hash values so I imagine that you will need to create a new signature each time, otherwise the signature will not match the hash of the data which is the whole point of signatures in OAuth.
精彩评论