I’m issuing a very annoying problem with Facebook API. If someone could help me that would be great.
I’m using Facebook’s JS SDK and what I need to acomplish eventually is to post a photo to a specefic album inside one of the user’s fan pages. I did succeed to post a photo to a specific album in the user’s profile, however – when it comes to pages.. it’s just not working.
The code I’m trying to use is the following:
var imgURL = "http://newsimg.ngfiles.com/178000/178187_asfasf.jpg";
FB.api('/ALBUMID/photos', 'post', {
message: 'Sweet',
url: imgURL,
access_token: 'PAGE ACCESS TOKEN'
}, function (response) {
if (!response || response.error) {
alert('Error occured');
} else {
alert('Post ID: ' + response.id);
}
console.log(response);
});
Ok, I’ve just found the problem. In order to post photos to a FB fan page you need also to get the “photo_upload” permission.