Facebook graph api comment count

后端 未结 9 902

seems Facebook changed the result of posts, few weeks ago it was possible to read the comment count from the post directly

https://graph.facebook.com/125909647492772_502

9条回答
  •  Happy的楠姐
    2021-02-01 20:20

    summary=true is what you are looking for

    Get likes count :

    114916098537132_1265715836790480/likes?summary=true
    

    Get comments count

    114916098537132_1265715836790480/comments?summary=true
    

    Get shares count :

    114916098537132_1265715836790480?fields=shares
    

    And last [ combining all 3 ]

    114916098537132_1265715836790480?fields=shares,likes.summary(true),comments.summary(true)
    

    Improved version ( add limit(0) to removes list of likes and get only summary ):

    114916098537132_1265715836790480?fields=shares,likes.limit(0).summary(true),comments.limit(0).summary(true)
    

提交回复
热议问题