13
  {
    "id": "11882030_4952296803730", 
    "from": {
      "name": "xxx", 
      "id": "11882030"
    }, 
    "message": "test", 
    "picture": "https://fbcdn-photos-a.akamaihd.net/hphotos-ak-ash4/408410_4952294483672_298434229_s.jpg", 
    "link": "https://www.facebook.com/photo.php?fbid=4952294483672&set=pcb.4952296803730&type=1&relevant_count=2", 
    "icon": "https://fbstatic-a.akamaihd.net/rsrc.php/v2/yx/r/og8V99JVf8G.gif", 
    "actions": [
      {
        "name": "Comment", 
        "link": "https://www.facebook.com/11882030/posts/4952296803730"
      }, 
      {
        "name": "Like", 
        "link": "https://www.facebook.com/11882030/posts/4952296803730"
      }
    ], 
    "privacy": {
      "description": "Friends", 
      "value": "ALL_FRIENDS", 
      "friends": "", 
      "networks": "", 
      "allow": "", 
      "deny": ""
    }, 
    "place": {
      "id": "471607792876974", 
      "name": "TTT", 
      "location": {
        "street": "", 
        "zip": "", 
        "latitude": x, 
        "longitude": x
      }
    }, 
    "type": "photo", 
    "status_type": "mobile_status_update", 
    "object_id": "4952294483672",
    "application": {
      "name": "Facebook for iPhone", 
      "namespace": "fbiphone", 
      "id": "6628568379"
    }, 
    "created_time": "2013-01-17T01:29:59+0000", 
    "updated_time": "2013-01-17T01:29:59+0000", 
    "comments": {
      "count": 0
    }
  }

如上所述,我发布了带有两张照片的状态。我可以在 中获取第一张照片的拇指 URL,picture并在 中获取相关链接和计数信息link

但是如何获取每张照片的特定 URL?

4

2 回答 2

9

FQL 通常提供比 Graph API 更多的信息。您必须使用FQLattachment表的参数来获取所有附加的照片。stream

SELECT attachment FROM stream 
 WHERE source_id = me() 
   AND post_id="11882030_4952296803730"

结果:

{
  "data": [
    {
      "attachment": {
        "media": [
          {
            "href": "https://www.facebook.com/photo.php?fbid=471082296...", 
            "alt": "", 
            "type": "photo", 
            "src": "https://fbcdn-photos-a.akamaihd.net/hphotos-ak-ash3/5826...", 
            "photo": {
              "aid": "4391039135", 
              "pid": "439104482145", 
              "fbid": 471507, 
              "owner": 102832, 
              "index": 1, 
              "width": 485, 
              "height": 172, 
              "images": [
                {
                  "src": "https://fbcdn-photos-a.akamaihd.net/hph...", 
                  "width": 130, 
                  "height": 46
                }
              ]
            }
          }
        ], 
        "name": "", 
        "caption": "", 
        "description": "", 
        "properties": [
        ], 
        "icon": "https://fbstatic-a.akamaihd.net/rsrc.phpjk.gif", 
        "fb_object_type": "album", 
        "fb_object_id": "4391044992857139135"
      },
      { 
        ... //Photo 2
      }
    }
  ]
}
于 2013-01-17T09:42:56.317 回答
3

基于 Stéphane Bruckerts 的回答;你在追求attachments。因此,我建议attachments您在图表请求中简单地请求该字段。

于 2016-06-27T01:13:02.600 回答