Facebook GRAPH API Photo like count without paging

会有一股神秘感。 提交于 2019-11-30 22:15:11

You can retrieve this information via the photo FQL table:

select like_info from photo where object_id = 10151255420886749;

Returns:

{
  "data": [
    {
      "like_info": {
        "can_like": true, 
        "like_count": 4444816, 
        "user_likes": false
      }
    }
  ]
}

You might also try /likes?summary=1 to get the "summary/total_count" added to your result, so

https://graph.facebook.com/10151255420886749/likes?summary=1

returns:

{
  "data": [
    {
      "id": "100004351206696",
      "name": "Marcos Nones"
    },
    {
      "id": "100002271852907",
      "name": "Kishor Ray"
    },
    ...
  ],
  "paging": {
    "cursors": {
      "after": "MTU4NTQ1MzczMw==",
      "before": "MTAwMDA0MzUxMjA2Njk2"
    },
    "next": "https://graph.facebook.com/10151255420886749/likes?summary=1&limit=25&after=MTU4NTQ1MzczMw%3D%3D"
  },
  "summary": {
    "total_count": 4434080
  }
}
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!