Invalid Facebook hash key the second time I log in

I am trying to embed the facebook login in my application, I followed the instructions provided on the Facebook website and everything works correctly, I can log in. get toke, get user information I need, everything works fine.

the second time when I try to log in, it says ("logged in as: name"), do you want to log out ?, and the weather I exit the program programmatically or I confirm this message and click "yes", The next time I log in, it takes me to the login page displaying this error:

invalid key hash, key hash ********************* does not match stored key hashes

it is strange when I go to my Facebook account and delete the application, I can log in again normally!

I have no idea what could be the reason, so I don’t know which piece of code I should put, any ideas?

+4
source share
1 answer

as Taukir suggested, copying the hash key from facebook allowed it. I have no idea why it works the first time, and not the second, although

I think facebook sdk has already changed at this point, but it's worth saving it here.

+1
source

Source: https://habr.com/ru/post/1607928/


All Articles