ich gelang es, Freunde, die meine App installiert ABER Ich habe einen Fall, der ist, dass einige Freunde, die bereits installiert meine App, konnte ich nicht finden, wenn ich Fordern Sie die Liste der Freunde an, die meine App installiert haben. Ich denke, die sind wegen ihrer Facebook-Privatsphäre nicht aufgeführt. ist es richtig ? oder was ist das Problem?Android Facebook SDK Wie bekomme ich alle Freunde Liste, wer meine app
Hier ist mein Anforderungscode
public void find_facebook_friends()
{
GraphRequest request = GraphRequest.newMeRequest(AccessToken.getCurrentAccessToken(), new GraphRequest.GraphJSONObjectCallback()
{
@Override
public void onCompleted(JSONObject object, GraphResponse response)
{
JSONObject json = response.getJSONObject();
try
{
String friend_name = null;
String friend_id = null;
if (json != null)
{
String js = json.toString();
String res = response.toString();
JSONObject c = response.getJSONObject();
JSONObject myfriends = null;
try
{
myfriends = c.getJSONObject("friends");
}
catch (JSONException e)
{
e.printStackTrace();
}
if (myfriends != null)
{
JSONArray mydata = myfriends.getJSONArray("data");
facebookfriends_namesArray = null;
facebookfriends_idArray = null;
for (int i = 0; i < mydata.length(); i++)
{
JSONObject jsonobject = mydata.getJSONObject(i);
friend_id = jsonobject.getString("id");
friend_name = jsonobject.getString("name");
}
}
}
}
catch (JSONException e)
{
e.printStackTrace();
}
}
});
Bundle parameters = new Bundle();
parameters.putString("fields", "id,name,link,email,picture,gender,friends, birthday,first_name,last_name,locale,timezone,updated_time,verified,friendlists");
request.setParameters(parameters);
request.executeAsync();
}