如何获取由页面发布的帖子的所有内容(文本和图像上传)?

时间:2014-03-04 05:25:52

标签: ios iphone facebook facebook-graph-api

我想通过页面在帖子中发布所有文字和图片。

目前我有点像

https://graph.facebook.com/ {page ID} / posts?& access_token = {access token}。

作为回应,我收到帖子列表,但在每个帖子中只有一个图片链接即将到来,同时有多个图片上传到该帖子。如何获取帖子中上传的所有图片?

回应:

https://docs.google.com/document/d/1c-pkorfy-ib4CjRhMEl3SME1WkyZ6DP8hLiJR96AfS0/edit?usp=sharing

先谢谢。

1 个答案:

答案 0 :(得分:0)

在您致电https://graph.facebook.com/ {page ID} / posts?& access_token = {access token}后,您可以获得 ID 。因此,请将此ID用作 post_id 。假设post_id是555361861181187_706802686037103,那么你可以进行FQL查询:

  

SELECT attachment,created_time FROM stream WHERE   POST_ID = '555361861181187_706802686037103'

截图:

enter image description here

作为替代方法,您只需使用FQL而不是graph.facebook.com/ {page ID} / posts端点。假设555361861181187是页面ID,例如

  

SELECT附件,消息,created_time FROM流WHERE   source_id ='555361861181187'和created_time< = now()ORDER BY   created_time DESC LIMIT 200

截图:

enter image description here

FQL文档:https://developers.facebook.com/docs/reference/fql/

最后,请在https://developers.facebook.com/x/apps/ {APP_ID} /信息中心/

重设您的 App Secret