I am currently using Facebook graph api search to search posts as
http://graph.facebook.com/search?q=iwatch&type=post&access_token=xxxxx
It returns in JSON format fields and use to include the like:count for a given post.
After reading the dev roadmap (https://developers.facebook.com/roadmap/) for changes after July 10th I am instructed to use the summary=true
param but I have no idea how to get this to work with search?
From FB blog on roadmap.
Removing 'count' from 'comments' Graph API connection We are removing the undocumented 'count' field on the 'comments' connection in the Graph API. Please request
{id}/comments?summary=true
explicitly if you would like the summary field which contains the count (now called 'total_count')
I have tried various combinations and searched for examples but no dice. Can anyone give me some advice on how to get the new summary=true to work within a search URL for searching posts?
If you ever need to re-enable the like counts, open the same “Reaction Preferences” window. In the window, toggle off both “On Posts from Others” and “On Your Posts” options. Facebook will start showing the like counts in your account.
The Graph API is the primary way to get data into and out of the Facebook platform. It's an HTTP-based API that apps can use to programmatically query data, post new stories, manage ads, upload photos, and perform a wide variety of other tasks.
You can access Page Insights by typing /insights after the name of your page in the URL field. This command will retrieve all of the Insights associated with your Page. Type "/insights" after your company name. Click the Submit button.
In early June 2019, the feature was further deprecated, with the majority of URLs for graph search queries no longer working. Facebook explained this by saying: "The vast majority of people on Facebook search using keywords, a factor which led us to pause some aspects of graph search and focus more on improving keyword ...
Couldn't find this in the documentation but multiple calls to the API are not necessary. You can use summary when querying a feed or multiple posts. Specify this in the fields parameter.
https://graph.facebook.com/PAGE_ID/feed?fields=comments.limit(1).summary(true),likes.limit(1).summary(true)
This will return a response like this.
{ "data": [ { .... "summary": { "total_count": 56 } ... }, { .... "summary": { "total_count": 88 } ... } ] }
This will be much faster than making individual requests for each object just to get the number of comments or likes.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With