本文整理汇总了PHP中Credentials::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP Credentials::__construct方法的具体用法?PHP Credentials::__construct怎么用?PHP Credentials::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Credentials
的用法示例。
在下文中一共展示了Credentials::__construct方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* Constructs a Credentials object for Users (making requests on behalf of a user).
*
* @param string $consumerKey Twitter Application Consumer Key
* @param string $consumerSecret Twitter Application Consumer Secret
* @param string|null $callbackUrl Twitter Application Callback URL
* @param string|null $accessToken Twitter Access Token
* @param string|null $accessTokenSecret Twitter Access Token Secret
*/
public function __construct($consumerKey, $consumerSecret, $callbackUrl = null, $accessToken = null, $accessTokenSecret = null)
{
parent::__construct($consumerKey, $consumerSecret);
$this->accessToken = $accessToken;
$this->accessTokenSecret = $accessTokenSecret;
$this->callbackUrl = $callbackUrl;
}
示例2: __construct
/**
* Constructs a Credentials object for applications (when making calls on Application's behalf).
*
* @link https://dev.twitter.com/oauth/application-only Application-Only Authentication
*
* @param string $consumerKey Twitter Application Consumer Key
* @param string $consumerSecret Twitter Application Consumer Secret
*/
public function __construct($consumerKey, $consumerSecret, $bearerToken = null)
{
parent::__construct($consumerKey, $consumerSecret);
$this->bearerToken = $bearerToken;
}
示例3:
function __construct()
{
parent::__construct('user', 'pwd');
}