从facebook打开图获取大图

时间:2016-08-16 22:17:49

标签: facebook facebook-graph-api

我正在使用taggable_friends权限,我得到的图片非常小:

      {
    "id": "AaKG56CVqePjK3sFxWO2DvvazqwT7CM1kHfFlWUGyMKCHZmc1t-xlvh3PqRXAurLfMJRAcBB1b7HeJnr7j6DnY_GNYI976qDM-2BbJY08yx8TQ",
    "name": "test test",
    "picture": {
      "data": {
        "is_silhouette": false,
        "url": "https://fbcdn-profile-a.akamaihd.net/hprofile-ak-xpl1/v/t1.0-1/p50x50/13907064_1214534405258556_1797869389967198661_n.jpg?oh=01a39553b932d419072ae015ff6574c1&oe=58589721&__gda__=1481901827_b29caab5f5a0d89f73304f2e88478a99"
      }
    }
  },
  {
    "id": "AaKUkJL9BixC7nuGF_aufISzRm2L64nay4h07UHvn3sTMDqcFOhVBPPR4zf2zEfxuDa4sF9ywcTlgQHPTMVRfXCaLUXvYnR0B2xnt-VQKt9X0A",
    "name": "test test",
    "picture": {
      "data": {
        "is_silhouette": false,
        "url": "https://fbcdn-profile-a.akamaihd.net/hprofile-ak-xtp1/v/t1.0-1/p50x50/10491155_1596823763928928_7193716970229043400_n.jpg?oh=b3dd2392ae30f8fba5f764872a7c6559&oe=5845F2FF&__gda__=1482475262_ffca8317fb938e328474426e66272f3c"
      }

可以更改网址并增加照片吗?

1 个答案:

答案 0 :(得分:0)

我更喜欢使用特定像素值作为最小尺寸(如果图像分辨率足够大):

/me/taggable_friends?fields=id,name,picture.width(500).height(500)

这将是另一种解决方案:

/me/taggable_friends?fields=id,name,picture.type(large)

参考:https://developers.facebook.com/docs/graph-api/reference/user/picture/