您好我现在已经尝试了几种资源,但似乎无法弄清楚如何在通过 javascript 将图像发布到 facebook 后返回 src_small url。我将 object_id 作为响应,然后我尝试执行 FQL 查询以获取大小 url ......上传功能执行良好,然后 fql 查询不返回任何内容。任何帮助将非常感激。
function uploadphoto() {
var imgURL = "img_URL";
FB.api('me/photos', 'post', {
url: imgURL, message: 'Pura Vita'
}, function (response) {
if (!response || response.error) {
alert(response.error);
} else {
alert(response.id);
getPhotoInfo(response.id);
}
});
}
function getPhotoInfo(oid) {
FB.api(
{
method: 'fql.query',
query: 'Select src_big,src_small from photo where aid in(SELECT aid FROM album WHERE owner = me()) and object_id =' + '"' + oid + '"'
},
function (response) {
alert('Post url: ' + JSON.stringify(response));
});
}