downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

OAuthException> <OAuthProvider::timestampNonceHandler
[edit] Last updated: Fri, 25 May 2012

view this page in

OAuthProvider::tokenHandler

(PECL OAuth >= 1.0.0)

OAuthProvider::tokenHandlertokenHandler コールバックを設定する

説明

public void OAuthProvider::tokenHandler ( callable $callback_function )

トークンハンドラコールバックを設定します。これは OAuthProvider::callTokenHandler() でコールされる関数です。

警告

この関数は、 現在のところ詳細な情報はありません。引数のリストのみが 記述されています。

パラメータ

callback_function

callable 関数名。

返り値

値を返しません。

例1 OAuthProvider::tokenHandler() コールバックの例

<?php
function tokenHandler($provider) {
    
    if (
$provider->token === 'rejected') {
        return 
OAUTH_TOKEN_REJECTED;
    } elseif (
$provider->token === 'revoked') {
        return 
OAUTH_TOKEN_REVOKED;
    }

    
$provider->token_secret "the_tokens_secret";
    return 
OAUTH_OK;
}
?>

参考



add a note add a note User Contributed Notes OAuthProvider::tokenHandler
There are no user contributed notes for this page.

 
show source | credits | stats | sitemap | contact | advertising | mirror sites