Facebook graph API tells me I can get a profile picture of a user using
http://graph.facebook.com/517267866/picture?type=large
which works fine. However, whe
For Android:
According to latest Facebook SDK,
First you need to call GraphRequest API for getting all the details of user in which API also gives URL of current Profile Picture.
Bundle params = new Bundle();
params.putString("fields", "id,email,gender,cover,picture.type(large)");
new GraphRequest(token, "me", params, HttpMethod.GET,
new GraphRequest.Callback() {
@Override
public void onCompleted(GraphResponse response) {
if (response != null) {
try {
JSONObject data = response.getJSONObject();
if (data.has("picture")) {
String profilePicUrl = data.getJSONObject("picture").getJSONObject("data").getString("url");
}
} catch (Exception e) {
e.printStackTrace();
}
}
}
}).executeAsync();