I am trying to get the friends of a test user using facebook graph api but it returns only the ids of the friends but not other details like first_name, last_name etc. This works though with real users. I specifically pass the fields that I require (the request looks something like this):
https://graph.facebook.com/me/friends?access_token=...&fields=id%2Cfirst_name%2Clast_name%2Cgender%2Clocale%2Clink%2Clocation%2Cbirthday%2Creligion%2Crelationship_status
The access token is the token granted to the test user when the test user logs in to my application.
I have found a similar SO post but I am not sure what is the solution suggested.
You need to use the App
access_tokenand this can be tested in the Graph API Explorer by doing the following:access_tokenAPP_ID/accounts/test-users?access_token=app_access_tokenthis would retrieve the test usersTEST_USER_ID/friends?fields=first_name,last_name,gender&access_token=app_access_tokenUPDATE:
Based on the comments below, I’ve tried to retrieve the birthday of the test user’s friends but the results were inconsistent.
access_token: IDs, birthdays and gender were retrieved but not namesaccess_token: IDs, names and gender were retrieved but not birthdaysHere’s a simple code:
The result using one of my test user accounts:

The first three rows were retrieved with “List Friends With User Token” and the rest with “List Freinds With App Token“.
Bottom line, this needs Facebook attention!