I implemented the library in my project, but when calling facebook, a webview is always opened and not the native facebook app, even though I have it installed. This happens on IOS and Android. The idea would be to open the native app so that the user doesn't have to enter their login and password via the browser, because this flow is a very bad experience. Could someone give me a light? I already took a look at all possible topics on google, but nothing worked. Even putting it like:
LoginManager.setLoginBehavior("native_only")
Which is the prop that the LoginBehavior can receive.
Any response is welcome. Thank you for your attention.
const LoginWithFacebook = async () => {
setLoadingFacebook(true)
LoginManager.logOut();
LoginManager.setLoginBehavior("native_only")
const data = await LoginManager.logInWithPermissions(["public_profile", "email"]);
if(data.isCancelled){
return setLoadingFacebook(false)
}
const responseToken = await AccessToken.getCurrentAccessToken();
afterLoginComplete(responseToken?.accessToken?.toString());
}