Expo Facebook Login not appearing

When I press the button the facebook login prompt does not appear like it used to. No errors or problems compiling or when pressing the button, it just does nothing. I have tested the appId on a snack and it works.


import React from 'react';
import Expo from 'expo';
import { NavigationActions } from 'react-navigation';
import { Button, Alert } from 'react-native';
import { connect } from 'react-redux';
import { loginWithToken } from '../store/user';
import { appId } from '../config';

const LoginButton = props => {

  async function facebookLogin() {
    const { type, token } = await Expo.Facebook.logInWithReadPermissionsAsync(appId, {
      permissions: ['public_profile', 'email'],
    });
    if (type === 'success') {
      await props.loginWithToken(token);
      props.navigation.dispatch(
        NavigationActions.reset(
          {
            index: 0,
            actions: [
              NavigationActions.navigate(
                {
                  routeName: 'Main'
                }
              )
            ]
          })
      );
    } else {
      Alert.alert('Error', `Could not log in to Facebook`);
    }
  }

  return (
      <Button
        raised
        onPress={facebookLogin}
        title="LOGIN WITH FACEBOOK" />
  );
};

const mapDispatch = dispatch => ({
  loginWithToken: token => dispatch(loginWithToken(token)),
});

export default connect(null, mapDispatch)(LoginButton);

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.