Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting friends picture using facebook-android-SDK

I'm getting friends ids and names using

mAsyncRunner.request("me/friends", new FriendRequestListener());

but I also need the friends profile pictures. I could loop over the friends to get them, but this is many requests.

Is there any way to get friends ids, names AND pictures in one request?

Thanks

like image 618
jul Avatar asked Feb 25 '23 23:02

jul


1 Answers

Unfortunately not because friends list is a JSON encoded answer and including all pic would be a huge response.
You have to call http://graph.facebook.com/ + userid + /picture?type=large (omit ?type=large if you want small sized version) for every friend.

like image 92
maxcanna Avatar answered Mar 07 '23 11:03

maxcanna