javascript - Getting like and comment counts per post of facebook page by graph api version 2 - Stack Overflow

I have been getting like and ment counts per post of facebook pagegroup feed call by graph api separat

I have been getting like and ment counts per post of facebook page/group feed call by graph api separately using FQL but as version 2 of graph api released fql no longer working to serve purpose.

So i have to find new ways to get ment and like counts per post of page feed display. I will make a separate call to get ment and like counts per post of the fb page as it may not be possible to get things in same page feed call(or it is?).

So, searching through google, i found following way using graph api call -

..page_id/feed?fields=likes.limit(1).summary(true){id},ments.limit(1).summary(true)&limit=10

Is this the best and error free way?? Also besides id and summary fields i also get created_time, paging, likes data by the above call which is unexpected and redundant, how do i exclude these additional fields?

So please any FB employee show me light on what is the best way to retrieve like and ment count per post of page/group feed using graph api version 2.

I have been getting like and ment counts per post of facebook page/group feed call by graph api separately using FQL but as version 2 of graph api released fql no longer working to serve purpose.

So i have to find new ways to get ment and like counts per post of page feed display. I will make a separate call to get ment and like counts per post of the fb page as it may not be possible to get things in same page feed call(or it is?).

So, searching through google, i found following way using graph api call -

..page_id/feed?fields=likes.limit(1).summary(true){id},ments.limit(1).summary(true)&limit=10

Is this the best and error free way?? Also besides id and summary fields i also get created_time, paging, likes data by the above call which is unexpected and redundant, how do i exclude these additional fields?

So please any FB employee show me light on what is the best way to retrieve like and ment count per post of page/group feed using graph api version 2.

Share Improve this question edited Aug 15, 2014 at 15:21 dev-m asked Aug 15, 2014 at 15:09 dev-mdev-m 4608 silver badges24 bronze badges 2
  • Furthermore, i want to get results by setting condition that when ment or like count per post is greater than 25. how to add that as fql was easy for this purpose. – dev-m Commented Aug 15, 2014 at 15:15
  • Thanks for the query. I really searched, but there is almost nothing to query the stats per post for an entire page. Everything is based on a single post or FQL. – Kees C. Bakker Commented Jan 2, 2015 at 17:42
Add a ment  | 

1 Answer 1

Reset to default 6

If you want to retrieve Likes and ments count of a post on FB you can achieve this by using Id of the post Like this

..Your_Post_ID?fields=likes.limit(0).summary(true),ments.limit(0).summary(true)

the result will contain Total numbers of likes of the post, total numbers of ments of the post, post ID and post created time.

The result will be like this

{
  "likes": {
    "data": [
    ], 
  "summary": {
    "total_count": 550
   }
  }, 
  "ments": {
    "data": [
    ], 
    "summary": {
    "order": "chronological", 
    "total_count": 858
    }
  }, 
  "created_time": "2014-10-12T05:38:48+0000", 
  "id": "Your_Post_ID"
}

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745037513a4607608.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信