= 0.99.1)OAuth::__construct — 新建一個 OAuth 對象說明public OAuth::__construct( string $consumer_key, string $consumer_se">

OAuth::__construct

(PECL OAuth >= 0.99.1)

OAuth::__construct新建一個 OAuth 對象

說明

public OAuth::__construct(
    string $consumer_key,
    string $consumer_secret,
    string $signature_method = OAUTH_SIG_METHOD_HMACSHA1,
    int $auth_type = 0
)

新建一個 OAuth 對象

參數(shù)

consumer_key

由服務(wù)提供者提供的 consumer key 。

consumer_secret

由服務(wù)提供者提供的 consumer secret 。

signature_method

可選參數(shù),用來定義使用哪種簽名方法,默認(rèn)為 OAUTH_SIG_METHOD_HMACSHA1 (HMAC-SHA1)。

auth_type

可選參數(shù),用來定義如何傳遞 OAuth 參數(shù)給消費(fèi)方,默認(rèn)為OAUTH_AUTH_TYPE_AUTHORIZATION (在 Authorization 頭部)。