array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'it', ), 'this' => array ( 0 => 'oauth.settoken.php', 1 => 'OAuth::setToken', 2 => 'Sets the token and secret', ), 'up' => array ( 0 => 'class.oauth.php', 1 => 'OAuth', ), 'prev' => array ( 0 => 'oauth.settimestamp.php', 1 => 'OAuth::setTimestamp', ), 'next' => array ( 0 => 'oauth.setversion.php', 1 => 'OAuth::setVersion', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/oauth/oauth/settoken.xml', ), 'history' => array ( ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); contributors($setup); ?>

OAuth::setToken

(PECL OAuth >= 0.99.1)

OAuth::setTokenSets the token and secret

Descrizione

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

Set the token and secret for subsequent requests.

Elenco dei parametri

token

The OAuth token.

token_secret

The OAuth token secret.

Valori restituiti

true

Esempi

Example #1 OAuth::setToken() example

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