ionic2 - Error after firebase authentication using facebook -


i'm trying authenticate user using facebook through firebase: login

but getting [object object] error: loginfailed

my code login is:

facebooklogin(): void {     this.fb.login(['email']).then( (response) => {         const facebookcredential = firebase.auth.facebookauthprovider           .credential(response.authresponse.accesstoken);          firebase.auth().signinwithcredential(facebookcredential)          .then((success) => {             alert("firebase success: ");             this.userprofile = success;          })         .catch((error) => {             alert(error);         });     }).catch((error) => {alert(error); }); } 

all of documentation see requests both email , public_profile in login function, perhaps error.

this.fb.login(['email', 'public_profile']).then( (response) => { 

Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -