【发布时间】:2014-03-07 05:19:15
【问题描述】:
我要做的是通过事件 ID 获取事件照片。我的代码:
function getFBphoto(event) {
FB.api(
"/"+ event +"/picture?width=500&height=500",
function (response) {
if (response && !response.error) {
console.log(response);
}
}
);}
Facebook 仍然为我提供 200 像素大小的图像,我尝试遵循一些建议并尝试使用我的代码版本:
function getFBphoto(event) {
FB.api(
"/"+ event +"/picture",
{
"redirect": false,
"height": "500",
"type": "normal",
"width": "500"
},
function (response) {
if (response && !response.error) {
console.log(response);
}
}
);}
不走运,仍然是最大 200x200px 的照片,虽然添加参数 large 仍然不影响获得更大的照片。
在这两种情况下来自 fb 的示例响应:
Object {data: Object}
data: Object
height: 50
is_silhouette: false
url: "https://fbcdn-sphotos-d-a.akamaihd.net/hphotos-ak-ash4/t1/c114.0.200.200/p200x200/1656179_10201352079056227_1689058768_n.jpg"
width: 50
__proto__: Object
__proto__: Object
问题是: 如何通过 API 调用获取事件的实际尺寸照片(例如:https://fbcdn-sphotos-g-a.akamaihd.net/hphotos-ak-prn2/t1/1507953_584284274994290_910086685_n.jpg)。
【问题讨论】:
标签: facebook facebook-graph-api