I'm using the graph api of facebook for android. I can not bring out any value from GraphRequest([...]).executeAsync(). So the return string is always empty
public String getPost(){
new GraphRequest(
AccessToken.getCurrentAccessToken(), "me?fields=friends,name", null, HttpMethod.GET,
new GraphRequest.Callback() {
public void onCompleted(GraphResponse response) {
JSONObject object = response.getJSONObject();
try {
friends = object.getJSONObject("friends").getJSONObject("summary").getString("total_count");
} catch (JSONException e) {
e.printStackTrace();
};
}
}
).executeAsync();
return friends;
}