So I got a website where I make the user log-in into the App, and he/she would be able to access all their photos within my page and edit them.
The way I get the albums is this:
FB.api(
"/me/albums",
function (response) {
if (response && !response.error) {
...
}
}
);
Then after getting the list of album IDs, I iterate through them to get their respective photos by doing:
FB.api(
"/"+albumId+"/photos",
function (response) {
if (response && !response.error) {
...
}
}
);
This would return an array of objects containing the image IDs.
I thought it would be by using FB.api("/imageId", function(){}) but that returns the same image object with the id.
I want to get the image source/full path so I could add them inside an HTML IMG tag. But I'm still having problems with it.
I saw that there was some way of doing it by getting a "JSON" from this URL:
http://graph.facebook.com/"+photoId
But that throws me a authentication error for example if I try to get it using AJAX (might be because ajax doesn't contain the authentication that FB object does)
How can I get that result ?
Thanks in advance.