PHPTS:一键免费搭建 Nginx + PHP + MySQL 运行环境

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 对象

参数

consumer_key

由服务提供者提供的 consumer key 。

consumer_secret

由服务提供者提供的 consumer secret 。

signature_method

可选参数,用来定义使用哪种签名方法,默认为 OAUTH_SIG_METHOD_HMACSHA1 (HMAC-SHA1)。

auth_type

可选参数,用来定义如何传递 OAuth 参数给消费方,默认为OAUTH_AUTH_TYPE_AUTHORIZATION (在 Authorization 头部)。