0
votes

I am using the Facebook login in android. Code:

loginFB() {
  this.fb.login(['public_profile', 'email'])
    .then(res => {
      if (res.status === "connected") {
        this.isLoggedIn = true;
        this.getUserDetail(res.authResponse.userID);
        console.log("this.isLoggedIn = true");
        this.Erreur = "isLoggedIn = true <br/>";
        console.log(this.users);
      } else {
        this.isLoggedIn = false;
        this.Erreur = "isLoggedIn = false <br/>";
      }
    }).catch(e => {
      console.log('Error logging into Facebook', e)
      this.Erreur = "Error 1 <br/>" + e.errorMessage + "<br/>";
    });
}

but always getting the following error:

SERVER_ERROR: [code] 1675030 [message]: Error performing query. [extra]:null
1

1 Answers

0
votes

Surprisingly, the problem was in key hash.

I have discovered that the key hash extracted using Java keytool is different from the one generated by Java code inside my Android app even though I have strictly followed all instructions in Facebook Login Developer page to get the key hash. I don't' know why they are different, but now after using key hash extracted from java code and pasting it to the project console in Facebook Developer page, my app worked fine..