通过Graph API上传图片& “图像文件丢失或无效”

时间:2013-01-03 15:18:13

标签: javascript facebook-graph-api

我的问题是图片网址有时候无法正常工作。当提交像这样的“http://www.webdoanhnghiep.biz/Templates/img/FacebookAmplifier.jpg”的图像网址时,它会显示错误“丢失或无效的图像文件”。然后,如果我尝试刷新,请清除缓存....然后再次提交。它有效。

var params = {};
params['message'] = messageWillPost;
    params['url'] = 'http://www.webdoanhnghiep.biz/Templates/img/FacebookAmplifier.jpg';

params['place'] = document.getElementById(locationSelectionClientID).value;

FB.api('/' + postToAlbumId + '/photos','post',params, function(response) {
    if (!response || response.error) {
        console.log(response.error.message);
    } else {
        var photoId = response.id;
        console.log("Post to facebook at: " + photoId);
    }
}); 

为什么会发生这种情况?怎么废? 谢谢你

0 个答案:

没有答案