Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get friend's birthday list using facebook api?

Tags:

facebook

I am trying to get friend birthday list.

But how to find using my api I dont know.

like image 734
Hare-Krishna Avatar asked Sep 10 '25 15:09

Hare-Krishna


2 Answers

Note: This is no longer possible. See this answer.

Use the OpenGraph API in whatever environment you use to retrieve the information. The birthday is in the user information object, see docs: http://developers.facebook.com/docs/reference/api/user

like image 58
Gintautas Miliauskas Avatar answered Sep 14 '25 05:09

Gintautas Miliauskas


Since v2.0 of the Graph API, it´s not possible to get friend birthdays anymore. You can only get the birthday of the authorized user by using the user_birthday permission. See the changelog for more information: https://developers.facebook.com/docs/apps/changelog

There is only one other possibility: If the friend authorized the App with user_birthday, you can get his birthday with the following call: /friend-id?fields=birthday

Of course you need to authorize users with user_friends too, in order to make this work. And you can also just store the birthday of all authorized users and don´t waste an extra API call on it.

like image 38
andyrandy Avatar answered Sep 14 '25 04:09

andyrandy