Facebook Authentication - Invalid Key Hash Message After Months working Ok (Solved)
Hi all, Good Night everyone,
After frustrating hours trying to understand this issue finally I got this working, this is my situation, so please check your development environment first.
1) I started my project in a diferent machine at 2020 and I migrated to a diferent computer in 2021, everything went fine with facebook, (My hash key was generated in my first computer and placed in facebook developer page).
2) I copied my private key from first computer to second computer and imported it, everything still fine for all 2021,
3) Yesterday I tried facebook login (usually I use google login and most of our customers do)
4) After Login using Facebook, I received a message stating that my hash key is wrong. I went to my first computing I generated the hash hey , it still generating the same number that I have in Facebook App page.
5) I tried copying the hash key from a message, however It still sending a error message!
6) After some reading I got a website for generating a hash key from your SHA1 value in your private key store (B4A-Tools-Private Key Signature) , just the SHA1,
this is the website:
http://tomeko.net/online_tools/hex_to_base64.php ,
you only need to paste the SHA1 value and you get the Hash Key, there is not need for downloading openssl.
7) In this case the hash key was the same that facebook message state, so I remove the old one in facebook developer app (inside my app), save it and tried, however I got the same error.
8) In facebook develper I have to put My App from Development to Active.
9) After this , I tried and evething went fine.
Final Words
* I don't understand why I was working from months, and it never noticed I am using apps generated from a different machine
* I don't understand why I am using my same private_key file, it game me a diferent hash number
* And finally, I have to put my app in Active Mode
I hope these words can help anyone with a similar issue
Best Regards
Virgilio from Panama