FB.login(function(response) {
if (response.authResponse)
{
FB.api('/me/photos', 'post',
{
url:'http://test.xyzfoodservices.com/wp-content/plugins/facebook_login/single.jpg'
}, function(response) {
if (!response || response.error) {
console.log(response.error);
console.log(response);
} else {
alert('Success: Content Published on Facebook Wall');
}
});
FB.api('/me/picture?type=normal', function(response) {
var str="<figure class='tint'> <img id='img' src='"+response.data.url+"'/></figure>";
document.getElementById("popUpDiv").innerHTML+=str;
}); } else
{
console.log('User cancelled login or did not fully authorize.');
}
},{scope: 'email,user_photos,user_videos'});
我已經成功地從Facebook訪問。但是當我嘗試在用戶牆上發佈圖像時facebook javascript 324需要上傳文件。我測試了許多代碼和解決方案,但沒有幫助我。所以請回答一些不同的解決方案,因爲我已經嘗試過在OverFlow上提供的解決方案。 在此先感謝。使用Javascript API發佈圖像錯誤324需要上傳文件
[感謝您告訴我們。祝你好運!](http://stackoverflow.com/help) – PeeHaa