Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What format does Facebook api return as "birthday"

According to Facebook docs requesting birthday data is done by requesting user_birthday permission set and then the birthday string is stored under birthday in the return array.

What format does it return in, and does the format vary according to users setting?

Formats that I would predict

1990-05-22 // standard
05.22.1990 // USA reverse format
22.05 // User hid birth year
1990 // Getting only birth year without a date
NULL // User hid entire birthday

For me right now is important to determine whether Facebook gives one standard format of birthday value or its format depends on users birthday settings?

like image 897
John Doe Avatar asked Apr 21 '14 08:04

John Doe


People also ask

What type of API does Facebook have?

The Graph API is the primary way to get data into and out of the Facebook platform. It's an HTTP-based API that apps can use to programmatically query data, post new stories, manage ads, upload photos, and perform a wide variety of other tasks.

What data can I get from Facebook API?

With the Facebook Graph API, you can access a wide range of user data, including user information such as name, email address, birthday, and friends list in JSON. You can also access information about pages that a user has liked or engaged with on Facebook, as well as events and photos that they have posted or shared.

How do I get my Facebook API user ID?

The simplest way to get a copy of the User Profile object is to access the /me endpoint: FB. api('/me', function(response) { }); This will this will return the users name and an ID by default.

Is Facebook Graph API a REST API?

The Legacy REST API is in the process of being deprecated, while the Graph API is the most current, so if you're unsure of which one to use, your best bet is to go with that one. As you suggested, the Graph API, just like the Legacy REST API, is in fact a RESTful API.


1 Answers

The birthday returned by the facebook is a string of the format: MM/DD/YYYY.

Reference.

like image 146
Sahil Mittal Avatar answered Sep 28 '22 08:09

Sahil Mittal