问题
I'd like to retrieve, for instance, a friend's birthday, using the graph API.
So I pick a friend whose birthday my profile can see, go to the Graph API Explorer, generate an access token with the friends_birthday
privilege, and input [friend_name]/?fields=birthday
and... it doesn't return anything. The birthday
field on the side is grayed out, with a mouse-over text that says
"Field is empty or disallowed by the access token".
The worst part is that it works fine for some friends, but not for others. Is it related to the level of visibility they set for this information on their profile? I assumed that the app can see everything my profile can see (if I give it full privileges), but maybe that's not the case. Or is there something wrong with my request?
回答1:
I had the same problem and the answer is that your friend can change the permissions it gives to apps. So, for the Graph API Explorer app your friend would need to give the user_birthday permission to the app in order for you to see their birthday through the app (and you have to give the app the friends_birthday permission as well).
See here for the comment that helped me figure that out.
来源:https://stackoverflow.com/questions/15764326/cant-access-friendss-informations-with-the-graph-api