Graph API: 2.4
PHP SDK: "facebook / php-sdk-v4": "~ 5.0"
I would like to get detailed information about the page through the PHP and PHP SDK. Using the request:
$response = $fb->get('/' . $sPageID . '?fields=posts', $_SESSION['facebook_access_token']);
returns messages with a good amount of data. But unfortunately the wrong values ββare:
The limit of 25 applies here. Therefore, even if one post should have 150, if I do count ($post['likes']) , I get only 25.
So, I tried changing my request and according to the graphical explorer, this seems to work fine: PAGE_ID/posts?fields=likes.limit(100),message,comments,shares,picture,link,type
Now I cannot turn this into my PHP call. I get timeouts and
Fatal error: Throw exception "Facebook \ Exceptions \ FacebookSDKException" with the message "Unable to convert the response from the graph to GraphNode because the response looks like GraphEdge. Try using GraphNodeFactory :: makeGraphEdge () instead ...
Is this possible with a single request in PHP, or do I need to run multiple requests, one for each message?
source share