EOAuth2Service::getAccessToken PHP Method

getAccessToken() protected method

Returns the OAuth2 access token.
protected getAccessToken ( string $code ) : string
$code string the OAuth2 code. See {@link getCodeUrl}.
return string the token.
    protected function getAccessToken($code)
    {
        return $this->makeRequest($this->getTokenUrl($code));
    }

Usage Example

Exemplo n.º 1
0
 protected function getAccessToken($code)
 {
     $result = parent::getAccessToken($code);
     $this->setState('uid', $result->user_id);
     return $result->access_token;
 }