Reputation: 33348
Let's rule out the obvious...
My Facebook app requests the following permissions: user_work_history, friends_work_history
...so the usual suspect (insufficient permissions) isn't the source of my problem.
ISSUE:
The following graph api call works perfectly: /me/friends?fields=name,work
I get back names, ids, work history, etc. Just like you'd expect.
BUT
When I replace the /me
with the user id of one my apps users (who has already authorized the app), I can only see names and ids (no work or education fields).
Why is this?
Upvotes: 1
Views: 1408
Reputation: 31860
The reason why, is the access token you are using is not the access token belonging to the user you want to look at. Check out your token in the linter tool (https://developers.facebook.com/tools/lint) and see who it belongs to.
When you do get a user access token for that individual, then you can use it to get their friends. You wont need to specify /{userid}/friends?fields=name,work
(although you could), just /me/friends?fields=name,work
since the access token belongs to that user id.
Upvotes: 1