我正在尝试在客户端墙上发布照片,它通过 Firefox 效果很好,但是当我尝试通过 Chrome(或资源管理器)做同样的事情时,我第一次使用该应用程序并安装它时,我没有根本没有得到回应......当我刷新页面并重试时,它工作正常并发布照片......
这是我正在使用的代码:
var imgURL = obj.picture;
FB.api('/me/photos', 'post', {
message: obj.description,
access_token: accessToken,
url: imgURL
}, function (responsePhoto) {
if (!responsePhoto || responsePhoto.error) {
if (!responsePhoto){
console.log(responsePhoto);
alert('An error has occured: please refresh and try again');
}
else {
console.log(responsePhoto);
alert('An error has occured:' + responsePhoto.error + ' please refresh and try again');
}
} else {
//alert('your photo has been uploaded');//('Post ID: ' + responsePhoto.id);
}
});
有任何想法吗?
谢谢