Error while trying to login with facebook and google Native (IONIC3)

Asked

Viewed 320 times

1

I am having some difficulties to implement the login of google and facebook Activate in an ionic3 application. The problems I get are the following, on my console :

main.js:71 16
main.js:84 {errorMessage: "Facebook error: SERVER_ERROR: [code] 1675030 
[message]: Erro ao realizar consulta. [extra]: null"}
2main.js:71 16

my duties are as follows: :

signInWithGoogle() {
this.authService.signInWithGoogle()
  .then(() => {
    this.toastCtrl.create({ duration: 3000, position: 'bottom', message: 
'Voce logou com o Google, Parabéns!' })
      .present();
  })
  .catch((error) => {
    console.log(error);
    this.toastCtrl.create({ duration: 3000, position: 'bottom', message: 
'Erro ao efetuar o login' })
      .present();
  });
}


signInWithFacebook() {
this.authService.signInWithFacebook()
  .then(() => {
    this.toastCtrl.create({ duration: 3000, position: 'bottom', message: 
 'Voce logou com o Facebook, Parabéns!' })
      .present();
  })
  .catch((error) => {
    console.log(error);
    this.toastCtrl.create({ duration: 3000, position: 'bottom', message: 
 'Erro ao efetuar o login' })
      .present();
  });
}

my authentication service :

signInWithGoogle() {
return this.googlePlus.login({
  'webClientId': '427145463587
9035jdo9sji99pnn8g5sve4j6ulskd2b.apps.googleusercontent.com',
  'offline': true
})
  .then(res => {
    return this.angularFireAuth.auth.signInWithCredential
(firebase.auth.GoogleAuthProvider
      .credential(res.idToken))
      .then((user: firebase.User) => {
        // atualizando o profile do usuario
        return user.updateProfile({ displayName: res.displayName, photoURL: 
res.imageUrl });
      });
  });
}


signInWithFacebook() {
return this.facebook.login(['public_profile', 'email'])
  .then((res: FacebookLoginResponse) => {
    //https://developers.facebook.com/docs/graph-api/reference/user
    //Ao logar com o facebook o profile do usuario é automaticamente 
atualizado.
    return this.angularFireAuth.auth.signInWithCredential
(firebase.auth.FacebookAuthProvider
      .credential(res.authResponse.accessToken));
  });
}
  • Take a look https://stackoverflow.com/questions/41861564/server-error-code-1675030-message-error-performing-query is the same error as yours, apparently in the facebook configuration.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.