When I try to login to Facebook it gives me this error
TypeError: null is not an object (evaluating 'LoginManager.logInWithPermissions')
at node_modules/react-native/Libraries/Core/ExceptionsManager.js:104:6 in reportException
at node_modules/react-native/Libraries/Core/ExceptionsManager.js:171:19 in handleException
at node_modules/react-native/Libraries/Core/setUpErrorHandling.js:24:6 in handleError
at node_modules/expo-error-recovery/build/ErrorRecovery.fx.js:12:21 in ErrorUtils.setGlobalHandler$argument_0
at [native code]:null in flushedQueue
at [native code]:null in invokeCallbackAndReturnFlushedQueue
Im calling the function like this:
import {View} from "react-native";
import React, { useState } from "react";
import {
LoginManager,
} from "react-native-fbsdk-next";
<View style={styles.horisontalView}>
<TouchableOpacity
onPress={() => {
LoginManager.logInWithPermissions([
"public_profile",
"email",
]).then(
function (result) {
if (result.isCancelled) {
console.log("Cancelado");
} else {
console.log(
"Login realizado con permisos: " +
result.grantedPermissions.toString()
);
}
},
function (error) {
console.log("Error en Login: " + error);
}
);
}}
>
</TouchableOpacity>
</View>
installed by following this instructions: https://www.npmjs.com/package/react-native-fbsdk-next

