I'm trying to figure out how to get users friends information using either Graph API or FQL
Just for testing I would like to get my friends education_histroy
.
To do that I created a test app, requested extended permissions using
scope=offline_access,manage_friendlists,friends_work_history,
friends_education_history,friends_about_me
and got access token to play with the API.
It works great when I query for current user using /me
. But it returns nothing for my friends.
I was assuming that if I request, let's say friends_work_history
, that extra field (work_history
) will appear inside friend's object, when I query by friend's id:
https://graph.facebook.com/FRIEND_ID&access_token=TOKEN
But all I see is basic info about that user (friend).
Then I tried to request that field specifically:
https://graph.facebook.com/FRIEND_ID?fields=work&access_token=TOKEN
With no luck again. Returns just friend's id..
I tried to access that information with FQL:
Returns work_history = TRUE
instead of array. And that friend definitely has work history specified.
Can someone help me to understand how to get friends info using my app and extended permissions?
Best Answer
Graph API is the smart choice in most cases. To retrieve your friend information you need to collect some extended permissions from the user first. Then you can retrieve a lot more information other than the basic ones.
Following is a list of extended permissions related to friends different kind of information
Hope it helps :)