如何从Facebook帖子中获取喜欢的照片,其中包含“XXX喜欢照片”的说明?

时间:2014-05-19 22:31:37

标签: facebook facebook-graph-api facebook-like

使用Facebook图形API,我可以得到一个如下所示的帖子:

{
  "id": "774345031_10153960483905032", 
  "from": {
    "id": "774345031", 
    "name": "Ben Davis"
  }, 
  "story": "Ben Davis likes a photo.", 
  "story_tags": {
    "0": [
      {
        "id": "774345031", 
        "name": "Ben Davis", 
        "offset": 0, 
        "length": 9, 
        "type": "user"
      }
    ]
  }, 
  "privacy": {
    "value": ""
  }, 
  "type": "status", 
  "created_time": "2014-03-25T20:47:39+0000", 
  "updated_time": "2014-03-25T20:47:39+0000"
}

如何获得上述照片?

1 个答案:

答案 0 :(得分:0)

您可以尝试以下FQL查询:

select pid, object_id, images from photo where pid in (select attachment.media.photo.pid from stream where post_id="774345031_10153960483905032")

当然,这仅适用于包含照片参考的帖子。请务必事先收集read_stream权限。