How to get a Facebook user avatar in an Android app?

I am trying to get an avatar image of the user currently logged in to save it on my server and use it later in my application.

How can I get the image directly?

+3
source share
3 answers

Try the following:

(replace USER_ID with an alias or user ID ...)

set the source as https://graph.facebook.com/USER_ID/picture

e.g. large page id icon 149926629437: http://graph.facebook.com/149926629437/picture?type=large

<img src="http://graph.facebook.com/149926629437/picture?type=large"/>

( ..): http://developers.facebook.com/docs/reference/api/

( aQuery ( android) ...

aq.id( holder.image).image("https://graph.facebook.com/" + USER_ID + "/picture?type=normal");

http://code.google.com/p/android-query/

, ... )

+2

, Android- android sdk β†’ https://github.com/facebook/facebook-android-sdk. :)

0

, :

https://graph.facebook.com/{ID}?fields=picture.height(2048)

response.picture.data.url

0

All Articles