facebookarchive / php-graph-sdk

The Facebook SDK for PHP provides a native interface to the Graph API and Facebook Login. https://developers.facebook.com/docs/php
Other
3.17k stars 1.96k forks source link

$helper->getAccessToken() return an URL #1048

Closed shengfa closed 5 years ago

shengfa commented 6 years ago

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

yguedidi commented 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.