I want to show the users profile picture in a list view. When I try to call the graph-api from android to retrieve the image, I always get the following error.
<
There is an easy way to get facebook user image for logged in user.
To make the code work add this import statement:
import com.facebook.Profile;
See example below (in this example I use Picasso library to set image):
Uri imageUri = Profile.getCurrentProfile().getProfilePictureUri(400, 400);
Picasso.with(this).load(imageUri).into(imageView);
Numbers 400 and 400 are image width and height respectively.