Oauth/access token/en
目录 |
oauth/access_token
Third-party application retrieve the unauthenticated Acess Token by request token.
URL
http://api.t.sina.com.cn/oauth/access_token
Format
OAuth return formate
HTTP Request Method
POST
Requests Count Limitation
false
Request Parameter
- Refer to OAuth protocol Section 6
- oauth_consumer_key: APP KEY。
- oauth_token: Request Token。
- oauth_signature_method: signature method, recommand “HMAC-SHA1”。
- oauth_timestamp:timestamp for Base String.
- oauth_nonce:Random ASCII string. For security reason.
- oauth_version : OAuth version, recommand "1.0".
- oauth_verifier: optional. verified code from server at the oauth/authorize step.
- oauth_signature:signature Base String generated from parameters above encrypted by HMAC-SHA1.
Usage
Response
oauth_token=c849d68edfd4d01dbb60c73e60c04360&oauth_token_secret=c7966260e5384f535222aa7aec7002c2&user_id=1567751400
Example
- See OAuth
PHP Example
Please download PHP SDK with OAUTH supported from Weibo SDK Development Kit Dowload Site
.
Sample Code:
//oauth/access_token $o = new WeiboOAuth( WB_AKEY , WB_SKEY , $_SESSION['keys']['oauth_token'] , $_SESSION['keys']['oauth_token_secret'] ); $last_key = $o->getAccessToken( $_REQUEST['oauth_verifier'] ) ; echo($last_key['oauth_token']);