Closed shengfa closed 5 years ago
Thank you for using the Facebook PHP SDK!
If you need help about using it, you should ask your questions on StackOverflow and tag them with the facebook-php-sdk
tag.
So I'm closing this, but if you found a bug in the SDK or think about a feature, feel free to open a new GitHub issues.
function throughFacebookCallback($request, $response, $args) { $helper = $this->facebook->getRedirectLoginHelper(); try { $accessToken = $helper->getAccessToken(); } catch( \Facebook\Exceptions\FacebookResponseException $e ) { // When Graph returns an error echo 'Graph returned an error: ' . $e->getMessage(); exit; } catch( \Facebook\Exceptions\FacebookSDKException $e ) { // When validation fails or other local issues echo 'Facebook SDK returned an error: ' . $e->getMessage(); exit; } echo $accessToken; }
The result $accessToken in the end is a link, not access_token