OAuth
PHP 手册

OAuth::setToken

(PECL OAuth >= 0.99.1)

OAuth::setTokenSets the token and secret

说明

public bool OAuth::setToken ( string $token , string $token_secret )

Set the token and secret for subsequent requests.

参数

token

The OAuth token.

token_secret

The OAuth token secret.

返回值

如果成功则返回 TRUE,失败则返回 FALSE

范例

Example #1 OAuth::setToken() example

<?php
$oauth 
= new OAuth(OAUTH_CONSUMER_KEY,OAUTH_CONSUMER_SECRET);
$oauth->setToken("token","token-secret");
?>


OAuth
PHP 手册