2

I am trying to implement Facebook Login to my React Native (Expo) + Firebase App. However, Expo.Facebook.logInWithReadPermissionsAsync does not resolve - the app gets stuck on Facebook, and neither 'success' nor 'cancel' is returned.

The login flow looks like this, and then gets stuck on the last screen (blank FB app with just "Cancel" button: https://imgur.com/KfLfJLU)

Any ideas what I might be missing?

import firebase from './firebase'

export async function loginWithFacebook() {
    const { type, token } = await Expo.Facebook.logInWithReadPermissionsAsync('2197841940631405', { permissions: ['public_profile', 'email']});
    console.log(type);
    if (type == 'success') {
        const credential = firebase.auth.FacebookAuthProvider.credential(token);
        firebase.auth().signInWithCredential(credential).catch(error => {
            console.log(error)
        })
    }
}
  • anything new on this ? – Orcun May 4 at 22:05
  • Same issue here – joelgullander May 4 at 22:38
  • Unfortunately, nothing new. For now I've replaced FB login with Google login, and it works fine: Google.logInAsync() – Karolina May 6 at 7:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.