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
    }
  }

以上、2枚の写真で近況を掲載しました。で最初の写真のサム URL を取得しpicture、関連するリンクとカウント情報を で取得できますlink

しかし、各写真の特定の URL を取得するにはどうすればよいでしょうか?

4

2 に答える 2

9

FQLは、多くの場合、GraphAPIよりも多くの情報を提供します。添付されているすべての写真を取得するには、 FQLテーブルのattachmentパラメーターを使用する必要があります。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 に答える