My app uses a simple facebook login. I have entered the keyhash in my app dashboard, key_hash section and I was able to login successfully. Now I have published the app and tried to login, but it is showing a error message on a webview saying that
"Invalid android_key parameter. The key rX6qeRitkFCWui3de74rxB_qc1s does not match any allowed key. Configure your app key hashes at http://developers.facebook.com/apps/<my_fb_app_id>".
Actually rX6qeRitkFCWui3de74rxB_qc1s is not my key hash which i have in native app. Where is it coming from? Anyways I entered this keyhash also in native app but getting the same error message and couldn't login still. Where am'i going wrong? Please help me.
Steps : Go to facebook developer's page : https://developers.facebook.com/ Open the App tabs and than click the Setting. Paste the generate hashkey on HashKey's field = If you don't have it yet, get your key hash part of code.
You will have to enter a password. The password is: android. A code will come up and that code is your key hash.
You can generate a hash key through coding, you simply do one thing. Paste this code in main class (first class) then run the app and check the logcat where you will find the hash key.
One more thing, replace this package name "com.example.creeper" with your package name:
try{
PackageInfo info = getPackageManager().getPackageInfo(
"com.example.creeper", PackageManager.GET_SIGNATURES);
for (Signature signature : info.signatures) {
MessageDigest md = MessageDigest.getInstance("SHA");
md.update(signature.toByteArray());
Log.d("KeyHash:",Base64.encodeToString(md.digest(), Base64.DEFAULT));
}
} catch (NameNotFoundException e) {
} catch (NoSuchAlgorithmException e) {
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With