0

I want to get Facebook friend list with gender in my Android project. My Code;

 new GraphRequest(
                AccessToken.getCurrentAccessToken(),
                "/"+ AccessToken.getCurrentAccessToken().getUserId()+"/taggable_friends",
                null,
                HttpMethod.GET,
                new GraphRequest.Callback() {
                    public void onCompleted(GraphResponse response) {
                        try {
                            JSONObject jsonObjectData = response.getJSONObject();
                            JSONArray jsonArrayData = jsonObjectData.getJSONArray("data");
                            personList = new ArrayList<Person>();
                            for (int i = 0; i < jsonArrayData.length(); i++) {
                                JSONObject jsonObjectPerson = jsonArrayData.getJSONObject(i);
                                Person person = new Person();
                                person.setId(jsonObjectPerson.optString("id"));
                                person.setName(jsonObjectPerson.optString("name"));

                                personList.add(person);
                            }
                        } catch (JSONException e) {
                            e.printStackTrace();
                        }
                    }
                }
        ).executeAsync();

This method return to me 3 parameters; ID, NAME and PICTURE. I try to change endPoint with "/friends" but this time data was null. When I try to use FQL, I get this message:

"fql is deprecated for versions v2.1 and higher".

How can I get Facebook friend list with gender?

  • 1
    taggable_friends is for tagging people only, you are not allowed to use it for any other purpose. – CBroe Nov 23 '16 at 08:28

1 Answers1

0

I'm afraid it's not possible via Graph Api at the moment. You could try Graph API Explorer to check its possibility.