src/Widop/Twitter/OAuth/OAuth.php
private function createOAuthToken(OAuthResponse $response)
    {
        if (!$response->hasData('oauth_token') || !$response->hasData('oauth_token_secret')) {
            throw new OAuthException('An error occured when creating the OAuth token.', $response);
        }

        return new OAuthToken($response->getData('oauth_token'), $response->getData('oauth_token_secret'));
    }
private function createOAuthToken(OAuthResponse $response)
    {
        if (!$response->hasData('oauth_token') || !$response->hasData('oauth_token_secret')) {
            throw new OAuthException('An error occured when creating the OAuth token.', $response);
        }

        return new OAuthToken($response->getData('oauth_token'), $response->getData('oauth_token_secret'));
    }
private function createOAuthToken ( OAuthResponse $ response ) { if ( ! $ response -> hasData ( 'oauth_token' ) || ! $ response -> hasData ( 'oauth_token_secret' ) ) { throw new OAuthException ( 'An error occured when creating the OAuth token.' , $ response ) ; } return new OAuthToken ( $ response -> getData ( 'oauth_token' ) , $ response -> getData ( 'oauth_token_secret' ) ) ; }
Creates an oauth token according to an OAuth response.

@param \Widop\Twitter\OAuth\OAuthResponse $response The OAuth response.

@throws \Widop\Twitter\OAuth\OAuthException If the token cannot be created.

@return \Widop\Twitter\OAuth\Token\OAuthToken The OAuth token.
Creates an oauth token according to an OAuth response .