0
I am trying to get the contact information of the facebook user. For this I am using the Facebook PHP SDK.
I can generate the login url correctly. However, when I try to get the information I get the error "Malformed access token".
The code I’m currently trying is:
$code = Input::get('code'); // Código que vem na queryString
Session::put('facebook', Input::all());
$facebook = $this->facebook_api_instance();
// Aqui é onde eu passo o código OAuth2 e é gerado um erro
$request = $facebook->request('GET', '/me/friends', [], $code);
$response = $facebook->getClient()->sendRequest($request);
You have to generate a Token and put in the URL in the code. Type like this:
&access_token=$authToken
. This variable$authToken
is from something similar that I did here that contains a token that I generated on Facebook Developer.– Diego Souza
Oh I get it. I thought it was something to do with the Facebook Token. Okay!
– Diego Souza