- Issue created by @sorlov
I'm trying to get Feeds from FB, but got errors.
After debugging I have found that issue is in part where permanent token should be fetched
// Permanent Token.
$request = $client->request('GET', $url . "/$account_id/accounts?access_token=$long_token");
$request = json_decode($request->getBody()->getContents());
foreach ($request->data as $response_data) {
if ($response_data->id == $page_id) {
$config->set('page_permanent_token', $response_data->access_token)->save();
return $response_data->access_token;
}
}
Response data is empty for this request.
I have found that permanent token can be fetched with request to https://graph.facebook.com/{graph_version}/{page_id}?fields=access_token&access_token={long_lived_token}
Active
2.0
Code