I have followed several tutorials but it seems the newest version of the Graph API broke many of them.
Here's my code:
function getAlbumImages(){
FB.api(
'/760126260690750/photos',
'GET',
{"limit":"100",
"access_token":"833367813443301|nDhKBT0o6K7a7j_5LMfc3QSbRNs"},
function (response) {
if (response && !response.error) {
createGallery(response);
} else
console.log(response.error);
});
}
function createGallery(imageJSON) {
for (var i=0, length = imageJSON.data.length; i < length; i++){
var image = imageJSON.data[i];
$('body').append(image.name);
}
};
However, nothing is appended to the body. Upon further inspection of the API call, the method /albumid/photos returns a photo object as specified by the docs, but this object does not contain anything but the ID, title and date of the photo. This is an excerpt of the data returned by my query:
{
"data": [
{
"created_time": "2015-07-23T21:39:40+0000",
"name": "summer is here!! #adisfrutar #relax #funnytime 💘😊🌴☀🐙🎼",
"id": "903479883022053"
},
So clearly, the new API call does not return the image URL as it used to.
My question is then, how do I get the image URLs from the page's album so I can display a gallery on my website?