R
R
Roma Ishutin2020-10-21 14:51:26
PHP
Roma Ishutin, 2020-10-21 14:51:26

Facebook Graph Api, review not displaying all information?

I want to pull reviews from the Facebook page, everything works, but for some reason information about who left the review is not displayed, it is shown only by the administrator (moderator).

require_once __DIR__ . '/vendor/autoload.php'; // change path as needed

$fb = new \Facebook\Facebook([
    'app_id' => 'id',
    'app_secret' => 'secret',
    'default_graph_version' => 'v2.10',
    //'default_access_token' => '{access-token}', // optional
]);

try {
    // Returns a `Facebook\FacebookResponse` object
    $response = $fb->get(
        '/113327093378819/ratings',
        'тут токен страницы'
    );
} catch(Facebook\Exceptions\FacebookResponseException $e) {
    echo 'Graph returned an error: ' . $e->getMessage();
    exit;
} catch(Facebook\Exceptions\FacebookSDKException $e) {
    echo 'Facebook SDK returned an error: ' . $e->getMessage();
    exit;
}
$graphNode = $response->getGraphEdge();


The output of the $graphNode array:

5f90209721868583470006.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton Shamanov, 2020-10-21
@SilenceOfWinter

no matching permission / access token

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question