I am integrating the Facebook login to my hybrid app and for this I have used cordova-plugin-facebook4.
$cordova plugin add cordova-plugin-facebook4 --save --variable APP_ID="1854483668193025" --variable APP_NAME="Lojas"
<plugin name="cordova-plugin-facebook4" spec="^2.2.0">
<variable name="APP_ID" value="1854483668193025" />
<variable name="APP_NAME" value="Lojas" />
</plugin>
$cordova run browser
FB.login() called before FB.init().
login () {
window.facebookConnectPlugin.login(['email, public_profile'],
this.onSignInSuccess, this.onSignInError)
}
What is wrong?
I discovered that the problem was due to having added the plugin and removed, I removed because the plugin did not work in the browser.
I followed the steps:
$cordova platform remove android
$cordova platform add android
$cordova plugin add cordova-plugin-facebook4 --save --variable APP_ID="1854483668193025" --variable APP_NAME="Lojas"