Oauth/request token/en

跳转到: 导航, 搜索
(Created page with '== oauth/request_token == Retrieve the unauthenticated Request Token. == URL == http://api.t.sina.com.cn/oauth/request_token ==Format== OAuth HTTP standard authenticating form…')
 
第30行: 第30行:
 
</pre>
 
</pre>
 
==Usage Description==
 
==Usage Description==
* See [OAuth/en|OAuth]
+
* See [[OAuth/en|OAuth]]
 
===PHP Example===
 
===PHP Example===
 
Please download PHP SDK with OAUTH supported from [[SDK/en | Weibo SDK Development Kit Dowload Site]] <br>  
 
Please download PHP SDK with OAUTH supported from [[SDK/en | Weibo SDK Development Kit Dowload Site]] <br>  

2011年1月21日 (五) 14:49的版本

目录

oauth/request_token

Retrieve the unauthenticated Request Token.

URL

http://api.t.sina.com.cn/oauth/request_token

Format

OAuth HTTP standard authenticating format

HTTP Request Method

GET

Requests Count Limitation

false

Request Parameter

  • Refer to OAuth protocol Section 6 [1]
  • oauth_consumer_key,consumer_key, App Key for the application
  • oauth_signature_method signature methon,suggest HMAC-SHA1
  • oauth_signature signature
  • oauth_timestamp timestamp
  • oauth_nonce random string
  • Returns Request Tokenand corresponding Request Token Secret


Usage

Response Example

oauth_token=8ldIZyxQeVrFZXFOZH5tAwj6vzJYuLQpl0WUEYtWc&oauth_token_secret=x6qpRnlEmW9JbQn4PQVVeVG8ZLPEx6A0TOebgwcuA&oauth_callback_confirmed=true

Usage Description

PHP Example

Please download PHP SDK with OAUTH supported from Weibo SDK Development Kit Dowload Site
. Sample Code:

//oauth/request_token
$o = new WeiboOAuth( WB_AKEY , WB_SKEY  );
$keys = $o->getRequestToken();
echo($keys['oauth_token'].' : '.$keys['oauth_token_secret']);