public function refreshOAuthToken(OAuthToken $token, $auto_set_request_token = false)
    {
        $rest = new REST(array(
            'server' => $this->oauth_token_url,
            'debug_mode' => $this->debug_mode
        ));

        if ($this->oauth_token_url != self::OAUTH_TOKEN_URL) {
            $this->disableCertificateCheck($rest);
        }

        $response = $rest->post('', $token->toParams());

        $this->checkResponse($response);
        $this->checkOAuthTokenResponse($response);

        // populate object from response
        $token->fromObject($response);

        if ($auto_set_request_token) {
            $this->rest = $this->createREST($token);
        }

        return $token;
    }
public function refreshOAuthToken(OAuthToken $token, $auto_set_request_token = false)
    {
        $rest = new REST(array(
            'server' => $this->oauth_token_url,
            'debug_mode' => $this->debug_mode
        ));

        if ($this->oauth_token_url != self::OAUTH_TOKEN_URL) {
            $this->disableCertificateCheck($rest);
        }

        $response = $rest->post('', $token->toParams());

        $this->checkResponse($response);
        $this->checkOAuthTokenResponse($response);

        // populate object from response
        $token->fromObject($response);

        if ($auto_set_request_token) {
            $this->rest = $this->createREST($token);
        }

        return $token;
    }
public function refreshOAuthToken ( OAuthToken $ token , $ auto_set_request_token = false ) { $ rest = new REST ( array ( 'server' => $ this -> oauth_token_url , 'debug_mode' => $ this -> debug_mode ) ) ; if ( $ this -> oauth_token_url != self :: OAUTH_TOKEN_URL ) { $ this -> disableCertificateCheck ( $ rest ) ; } $ response = $ rest -> post ( '' , $ token -> toParams ( ) ) ; $ this -> checkResponse ( $ response ) ; $ this -> checkOAuthTokenResponse ( $ response ) ; // populate object from response $ token -> fromObject ( $ response ) ; if ( $ auto_set_request_token ) { $ this -> rest = $ this -> createREST ( $ token ) ; } return $ token ; }
Refresh OAuth token, and will automatically set the access token for
making authenticated requests with this client.

@param OAuthToken $token
@param boolean $auto_set_request_token true if the token should be
immediately applied to this client
@return OAuthToken object containing OAuth token details
@throws BaseException
Refresh OAuth token and will automatically set the access token for making authenticated requests with this client .