1

Im using Unity 2019.3.0f3 on Windows 10. I've imported Google-Sign In Plugin and Facebook SDK. I've set up an app in Facebook Developers. I've gone through the process detailed here to generate the hash key. In the inspector, FacebookSettings under Android Build Facebook Settings, Package Name, Class Name and Debug Android Key Hash are filled. And I've filled those values into Facebook Developer console.

But when i build the app into my phone and test out the login function facebook throws an error "invalid key hash. the key hash xxxxxxxxxxxxxxxxxxxxxx does not match any stored key hashes." Now the key hash xxxxxxxxxxxxxxxxxxxx supplied by facebook is not the same as the Debug Android Key Hash in Unity inspector(which is the one i supplied into FB developer console). So now I'm confused, is the hash key supplied by the error the correct one or is it somehow conflicting with something because of the Google Sign In Plugin? Because for the google sign in plugin i also has to go through a whole keytool process.

1 Answers1

0

Try referring my this link:

Add that code to get Hash programmatically https://stackoverflow.com/a/49320880/9460261

You need to get debug build hash code from logcat by running debug build.Then get release build hash code from logcat by running a release build.

Add both hash code in facebook developer console.(https://developers.facebook.com/)

Sagar
  • 554
  • 5
  • 21