What format does Facebook api return as "birthday"
Asked Answered
P

1

9

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?

Pervasive answered 21/4, 2014 at 8:44 Comment(0)
P
21

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

Reference.

Precept answered 21/4, 2014 at 8:46 Comment(1)
According to new Graph API The person's birthday. This is a fixed format string, like MM/DD/YYYY. However, people can control who can see the year they were born separately from the month and day so this string can be only the year (YYYY) or the month + day (MM/DD)Colner

© 2022 - 2024 — McMap. All rights reserved.