4

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?

Sahil Mittal
  • 20,697
  • 12
  • 65
  • 90
Timst
  • 930
  • 1
  • 11
  • 26
  • 3
    Just adding that I'm seeing this behave the same as you are, using this request with the relevant permissions: me/friends?fields=id,name,birthday I see some birthdays but not others (even though I can see them via the Facebook UI). If this is a permissions issue it's not clear how to solve it unfortunately. – Cormac Driver Apr 02 '13 at 13:19

1 Answers1

3

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.

Community
  • 1
  • 1
Paul D. Eden
  • 19,939
  • 18
  • 59
  • 63