1
Using the v2.9 api.
include('controller/facebook/init.php');
try {
// Returns a `Facebook\FacebookResponse` object
$response = $fb->get(
'/POST_ID/likes',
'ACCESS_TOKEN',
'summary=total_count'
);
} 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;
}
$graphEdge = $response->getGraphEdge();
print_r($graphEdge);
The goal in question is to get the total of Likes of the post, also believe that exchanging the term 'Likes' for shares
or comments
the data corresponding to the post will be returned.
The returned print is that of the image, but the total is not returned.