我正在使用此代码在 facebook 上分享照片,它工作正常,但我想用 js api 一键分享多张照片
var accessToken = response.authResponse.accessToken;
var postMSG = "Hello ...";
var filename = $('#photo1').val();
var url="https://graph.facebook.com/me/photos?access_token="+accessToken+"&message="+postMSG;
FB.api('/me/photos', 'post', {
message:postMSG,
url:filename
}, function(response){
if (!response || response.error)
{
alert(response.error);
console.log(response);
alert(response);
}
else
{
alert('Post ID: ' + response.id);
}
}
);