Search code examples
androidfacebookfacebook-android-sdk

How to get facebook profile picture of user in facebook SDK 3.0 Android


i am using facebook SDK 3.0 i have to get profile picture of user login. Here is the code I use:

URL image_value = new URL("http://graph.facebook.com/"+id+"/picture" );
profPict=BitmapFactory.decodeStream(image_value.openConnection().getInputStream());

But I don't get the desired result.


Solution

  • You should change your code following:

    URL image_value = new URL("http://graph.facebook.com/"+id+"/picture" );
    

    Possible GET parameters for the URL can be found here: https://developers.facebook.com/docs/graph-api/reference/user/picture/