Facebook Graph API : get larger pictures in one request
The best way to get all friends (who are using the App too, of course) with correct picture sizes is to use field expansion, either with one of the size tags (square, small, normal, large):
/me/friends?fields=picture.type(large)
(edit: this does not work anymore)
...or you can specify the width/height:
me/friends?fields=picture.width(100).height(100)
Btw, you can also write it like this:
me?fields=friends{picture.type(large)}
you do not need to pull 'picture' attribute though. there is much more convenient way, the only thing you need is userid, see example below;
https://graph.facebook.com/user_id/picture?type=large
p.s. type defines the size you want
plz keep in mind that using token with basic permissions, /me/friends will return list of friends only with id+name attributes
You can set the size of the picture in pixels, like this:
https://graph.facebook.com/v2.8/me?fields=id,name,picture.width(500).height(500)
In the similar manner, type
parameter can be used
{user-id}/?fields=name,picture.type(large)
From the documentation
type enum{small, normal, album, large, square}
As described in this bug on Facebook, you can also request specific image sizes now via the new API "field expansion" syntax.
Like so:
https://graph.facebook.com/____OBJECT_ID____?fields=picture.type(large)