如何在 Facebook 上获取 post 的数据,例如评论,图片 api

How to get data of post on facebook like comments, picture by graph api

我使用图表 api 将 post 图片上传到用户的墙上,在获得 postid 之后,我尝试通过图表 api 获取 post 数据按照这个 url:

https://graph.facebook.com/v2.4/postid?access_token=my_access_token

但是结果return只有message,created_time,id

{
   "created_time": "2015-09-10T01:52:18+0000",
   "message": "test",
   "story": "Minh D\u01b0\u01a1ng added 2 new photos to the album: test_demo_app Photos.",
   "id": "507382632760376_508325799332726"
}

那么,如何获取 post 的其他数据,例如评论、故事中的图片、喜欢?

请先查看文档。从 v2.4 开始,您必须指定要从图表中返回的每个字段 API。参见

Declarative Fields To try to improve performance on mobile networks, Nodes and Edges in v2.4 requires that you explicitly request the field(s) you need for your GET requests. For example, GET /v2.4/me/feed no longer includes likes and comments by default, but GET /v2.4/me/feed?fields=comments,likes will return the data. For more details see the docs on how to request specific fields.