skip to Main Content

I implemented login with facebook in my android app few days ago and everything was working well. But now I’m getting the error “Invalid Api Key Hash…” with a different api key hash from which I obtained from command prompt.

If I delete the app in the user’s facebook profile that logged in (“Configuration –> Applications”) the error dissapears.

Any ideas about what could be the problem?

3

Answers


  1. May be the key-store is changed which generate the new key Hash. You can add this new key Hash in the app registered on the Facebook developer account
    This link will help you in generating the key hash which is a debug key-hash https://stackoverflow.com/a/9600642/5907003

    Login or Signup to reply.
  2. Facebook does not allow login to public while you not allow it. You may use this command in Linux machine and paste the hash key in your Facebook development account > settings > Basic > Key Hashes

    keytool -exportcert -alias androiddebugkey -keystore "<path-to-users-directory>.androiddebug.keystore" | openssl sha1 -binary | openssl base64
    

    if it is still under development or you may visit https://developers.facebook.com/ to allow it for public, to do it select your Application after login into your development account and choose App Review from side menu then swich Yes.

    Login or Signup to reply.
  3. The hash code, which was created from command prompt, works only one time. You can find more information here: android facebook integration invalid key hash

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search