OAuth::getAuthorizeURL PHP Méthode

getAuthorizeURL() public static méthode

获取授权URL
public static getAuthorizeURL ( $redirect_uri, $response_type = 'code', $wap = false ) : string
$redirect_uri 授权成功后的回调地址,即第三方应用的url
$response_type 授权类型,为code
$wap 用于指定手机授权页的版本,默认PC,值为1时跳到wap1.0的授权页,为2时同理
Résultat string
    public static function getAuthorizeURL($redirect_uri, $response_type = 'code', $wap = false)
    {
        $params = array('client_id' => self::$client_id, 'redirect_uri' => $redirect_uri, 'response_type' => $response_type, 'wap' => $type);
        return self::$authorizeURL . '?' . http_build_query($params);
    }

Usage Example

Exemple #1
0
function ilost_get_fanauthorize()
{
    $o = new OAuth(fan_akey, fan_skey);
    $keys = $o->getRequestToken();
    $aurl = $o->getAuthorizeURL($keys['oauth_token'], false, fan_callback);
    $_SESSION['temp'] = $keys;
    return $aurl;
}
All Usage Examples Of OAuth::getAuthorizeURL