Facebook Auth get birthday and gender - Firebase / firebase-ui auth

2,155 views
Skip to first unread message

Milton Quranda

unread,
Sep 27, 2016, 6:18:07 PM9/27/16
to Firebase Google Group
The app i am writing is gender and age range specific. I have been trying to get the user information specifically age or age range and gender from Facebook and Google auth. FirebaseUser itself only has email address, display name, uid and token. No information in birthday and gender.

Facebook basic profile provides age range and gender and a specified scope will provide a birthday. I am not able to extract these information from basic profile neither am i able to extract the extra scope that i specified. Probably i am not aware of how to.

Google oauth provides a scope for birthday, but its not showing up in provider data either.

https://www.googleapis.com/auth/user.birthday.read

Can someone provide a sample on getting these information from facebook and google using either firebase or firebase-ui.

Thanks for your response in advance. Any ideas / suggestions would be really helpful. I am currently stuck.

-Milton

Kato Richardson

unread,
Sep 28, 2016, 11:45:44 AM9/28/16
to Firebase Google Group
Hi Milton,

If you need additional information that we don't provide in FirebaseUser, then you utilize the FacebookCallback<LoginResult> to grab info provided by Facebook, or take the token from loginResult.getAccessToken() and make calls to the Facebook SDK to grab additional information. Google works similarly.

☼, Kato



--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-talk+unsubscribe@googlegroups.com.
To post to this group, send email to fireba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/d96437f8-0678-4639-9eba-10c32860b95f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

Kato Richardson | Developer Programs Eng | kato...@google.com | 775-235-8398

Milton Quranda

unread,
Oct 1, 2016, 8:01:52 PM10/1/16
to Firebase Google Group
Mato,

Do you have any example or sudo code? I was looking to add FacebookCallback but cant seem to find an api to add the callback in FirebaseUI. LoginResult will be returned with the onSuccess on callback as well. With firebase UI is there a way to inject the callback or overide the callback method?

-Milton

On Wednesday, 28 September 2016 11:45:44 UTC-4, Kato Richardson wrote:
Hi Milton,

If you need additional information that we don't provide in FirebaseUser, then you utilize the FacebookCallback<LoginResult> to grab info provided by Facebook, or take the token from loginResult.getAccessToken() and make calls to the Facebook SDK to grab additional information. Google works similarly.

☼, Kato


On Tue, Sep 27, 2016 at 9:39 AM, Milton Quranda <milton....@gmail.com> wrote:
The app i am writing is gender and age range specific. I have been trying to get the user information specifically age or age range and gender from Facebook and Google auth. FirebaseUser itself only has email address, display name, uid and token. No information in birthday and gender.

Facebook basic profile provides age range and gender and a specified scope will provide a birthday. I am not able to extract these information from basic profile neither am i able to extract the extra scope that i specified. Probably i am not aware of how to.

Google oauth provides a scope for birthday, but its not showing up in provider data either.

https://www.googleapis.com/auth/user.birthday.read

Can someone provide a sample on getting these information from facebook and google using either firebase or firebase-ui.

Thanks for your response in advance. Any ideas / suggestions would be really helpful. I am currently stuck.

-Milton

--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-tal...@googlegroups.com.

To post to this group, send email to fireba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/d96437f8-0678-4639-9eba-10c32860b95f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages