I’m getting an plugin_not_installed error when trying to login with facebook with firebase.
I built it using Ionic Package and installed it on my iPhone.
I have already have firebase working with login in with the email and password, I’m just trying to add facebook login.
I am following this tutorial
So I ran this
ionic plugin add cordova-plugin-facebook4 --variable APP_ID=“123456789” --variable APP_NAME="myFacebookApName"
npm install --save @ionic-native/facebook
Added Facebook to the providers in my app.module.ts
My login code
facebookLogin() {
this.facebook.login(['email']).then((response) => {
const facebookCredential = firebase.auth.FacebookAuthProvider
.credential(response.authResponse.accessToken);
firebase.auth().signInWithCredential(facebookCredential)
.then((success) => {
console.log("Firebase success: " + JSON.stringify(success));
this.userProfile = success;
})
.catch((error) => {
alert("error 2");
this.errorMessage = error
console.log("Firebase failure: " + JSON.stringify(error));
});
}).catch((error) => {
alert("error 1");
this.errorMessage = error
console.log(error)
});
}
I am already using the plugins like Contacs and SocialSharing and the work fine on my device. Not sure what I am missing to get the plugin_not_installed error.
Thanks in advance.