Does anyone know how I can get a thumbnail/avatar of a facebook user using the javascript sdk?
I know to get the full size picture I can do the folllowing:
//Get a list of all the albums
FB.api('/me/albums', function (response) {
for (album in response.data) {
// Find the Profile Picture album
if (response.data[album].name == "Profile Pictures") {
// Get a list of all photos in that album.
FB.api(response.data[album].id + "/photos", function(response) {
//The image link
image = response.data[0].images[0].source;
});
}
}
});
Not sure on how to get the thumbnail/avatar size. Something like a 50×50 size
You can also just use an
<img>tag with a special URL to do the same thing: