How to get Facebook public profile data using angularfire auth and firebase


I’m trying to get data from users’ Facebook profiles who login/signup in my app with Facebook like their birthday, images, gender etc. Right now I’m just adding arbitrary values to my database but I want to get their gender, profile picture url, and birthday if possible. For the life of me I can’t figure out how to do it. Here’s what I have so far:

loginWithFacebook() {
return Observable.create(observer => {
  if ('cordova')) {
    Facebook.login(['public_profile', 'email']).then(facebookData => {
      let provider = firebase.auth.FacebookAuthProvider.credential(facebookData.authResponse.accessToken);
      firebase.auth().signInWithCredential(provider).then(firebaseData => {'users').update(firebaseData.uid, {
          name: firebaseData.displayName,
          provider: 'facebook',
          keys: firebaseData.keys,
          birthday: firebaseData.birthday,
          snapchat: firebaseData.snapchat,
          gender: firebaseData.gender,
          image: firebaseData.photoURL
    }, error => {
  } else {{
      provider: AuthProviders.Facebook,
      method: AuthMethods.Popup,
    }).then((facebookData) => {
      console.log(facebookData);'users').update(facebookData.auth.uid, {
        name: facebookData.auth.displayName,
        provider: 'facebook',
        keys: 5,
        birthday: 'w',
        snapchat: 'w',
        gender: 'male',
        image: facebookData.auth.photoURL
    }).catch((error) => {"error", error);

Any help would be greatly appreciated!


I am trying too get some info from the facebook. Until now i am trying to get users connect at my app through facebook but i haven’t achieve it yet. Did you done it? I have follw the docs but still no hope.