Reputation: 3807
i am using this fql query this gives me 50x50px profile pic of user's friend
$FQLQuery = 'SELECT uid,sex,pic_square FROM user WHERE uid in (SELECT uid2 FROM friend WHERE uid1 = me())';
i want to get 100x100px or 200x200px by using fql only.
how i can get that?
Upvotes: 0
Views: 2641
Reputation: 60
I get the avatar using graph API by the following
$request_url ="https://graph.facebook.com/" .
$parfbuid . "?fields=picture.width(200).height(200)";
$requests = file_get_contents($request_url);
$data = json_decode($requests);
$fsource = $data->picture->data->url;
$size=getimagesize($fsource);
and then I use GD library to get this image and save on disk. This way you can get whatever size you like of the rectangle avatar image.
Upvotes: 2
Reputation: 1160
Since this is the first result when searching for "fql square pic", I would like to point out that you can now select the pic_square field to get a 50x50 version of the user's profile picture.
Upvotes: 1
Reputation: 29
You need only friends Facebook ids, profile images get by CURL or file_get_contents from URL:
https://graph.facebook.com/FRIEND_ID/picture?type=normal
Supported types: small, normal, large, square
Upvotes: 1
Reputation: 53929
According to documentation you can't. You will have to fetch one of the bigger images (pic_big
maybe), and then make it into a square yourself with PHP.
Upvotes: 1