public function Authenticate($code, $scope = null)
    {
        if (!empty($code)) {
            $this->AddParams(array(
                'code' => $code,
                'client_secret' => $this->config['client_secret'],
                'grant_type' => 'authorization_code',
                'redirect_uri' => $this->config['redirect_uri']
            ));

            return $this->Post($this->config['oauth_token_uri']);
        }
    }
public function Authenticate($code, $scope = null)
    {
        if (!empty($code)) {
            $this->AddParams(array(
                'code' => $code,
                'client_secret' => $this->config['client_secret'],
                'grant_type' => 'authorization_code',
                'redirect_uri' => $this->config['redirect_uri']
            ));

            return $this->Post($this->config['oauth_token_uri']);
        }
    }
public function Authenticate ( $ code , $ scope = null ) { if ( ! empty ( $ code ) ) { $ this -> AddParams ( array ( 'code' => $ code , 'client_secret' => $ this -> config [ 'client_secret' ] , 'grant_type' => 'authorization_code' , 'redirect_uri' => $ this -> config [ 'redirect_uri' ] ) ) ; return $ this -> Post ( $ this -> config [ 'oauth_token_uri' ] ) ; } }
Gets the access token from an oAuth request
@access public
@param string $code The authorization code returned by the oAuth call
@param string $scope The scope of the oAuth request
@return Response
Gets the access token from an oAuth request