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.
To use the Facebook SDK in an Android Studio project, add the SDK as a build dependency and import the SDK. Go to Android Studio | New Project | Minimum SDK. Select API 15: Android 4.0. 3 (IceCreamSandwich) or higher and create your new project.
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/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With