I can query Facebook's API to get a list of taggable friends with:
FB.api('me/taggable_friends', function (taggable) {
document.getElementById('friends').innerHTML = JSON.stringify(taggable);
});
But this only returns a url to a tiny profile picture. I'd like to get the full sized picture.
Are non-app users' pictures still avalible in Facebook Open Graph v2.0?
The above link has a comment by Simon Cross that says "You can use ...? Fields=width(n),height(n) to get a larger image" but I can't figure out the correct syntax.
Does anyone know how this works?
Thanks
I have been struggling with the same issue, the Facebook docs on this are awful, but finally I worked it out:
FB.api(
"/me/taggable_friends?fields=name,picture.width(100), picture.height(100)",
function (response) {
if (response && !response.error) {
// Do what you like with the response data here response.data;
callback();
} else {
console.log(response);
}
}
);
Hoe that helps!
The format of @Jozef's answer did not work for me. This worked instead:
fields=name,picture.width(100).height(100)
I'm using the nodejs module facebook-node-sdk, so perhaps my issue was specific to that. Here is a full example:
FB.api('me/taggable_friends', {
fields: 'name,picture.width(100).height(100)',
limit: 20,
access_token: req.session.access_token
}, function (result) {
if(!result || result.error) {
return false;
}
d = {
friends: result.data,
};
res.render('myview', d);
});
That will return a limit of 20 friends, with 100x100 px thumbnails.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With