dev_hero
dev_hero

Reputation: 19

Removing 'count' from 'comments' Graph API connection

recently read fb developer roadmap and the section "Removing 'count' from 'comments' Graph API connection".Does it mean that if i call graph api like https://graph.facebook.com/page_id/feed then in data the "count" field will be deprecated located under "comments" field ? or in some other calls ? please answer asap i did not get help anywhere.

Upvotes: 0

Views: 2025

Answers (3)

user1105951
user1105951

Reputation: 2287

If I understand you correctly, and you want the comments counts for each feed in page in one call, try this syntax :

pageID/posts?fields=comments.limit(2).summary(true).filter(toplevel)

Upvotes: 6

charlesrapp
charlesrapp

Reputation: 21

Using Facebook Graph API Explorer, I've got different results depends which application i'm using with the Explorer.

By default with the application "Graph API Explorer", I see the summary section in my results but if I select my app, summary section disappears in results.

I use the same permissions and requests as the app "Graph API Explorer".

Any idea ?

Upvotes: 1

TommyBs
TommyBs

Reputation: 9646

It's exactly as it states it in the 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')

So you would need to add summary=true to your call and then use the total_count field

Upvotes: 3

Related Questions