oauth-4-laravel
oauth-4-laravel copied to clipboard
Save the accesstoken? Getting: Call to undefined method OAuth\OAuth2\Service\Facebook::getAccessToken()
I wish to save the access token for Facebook in the users table, so I later can query the users facebook.
How is this accomplished? I have tried with:
$fb = OAuth::consumer( 'Facebook' );
$fb->getAccessToken();
But that generates this error:
Call to undefined method OAuth\OAuth2\Service\Facebook::getAccessToken()
What do I do wrong?
Solved.
Get access token like this:
$token = $fb->requestAccessToken( $code );
dd($token->getAccessToken());
confiax please help me what value have to be passed from the input code to access the $token value i am stuck there