invalid key hash. the key hash does not match any stored key hashes facebook android -
i'm developing android application uses facebook authentication. in debug mode, utilize debug key hash generated code:
try { packageinfo info = getpackagemanager().getpackageinfo( "com.org.package", packagemanager.get_signatures); (signature signature : info.signatures) { messagedigest md = messagedigest.getinstance("sha"); md.update(signature.tobytearray()); string sign = base64 .encodetostring(md.digest(), base64.default); log.e("my key hash:", sign); } } grab (namenotfoundexception e) { } grab (nosuchalgorithmexception e) { }
now want publish app in google play store, need generate release key hash. used method mentioned in facebook developers doc is:
keytool -exportcert -alias <release_key_alias> -keystore <release_key_path> | openssl sha1 -binary | openssl base64
for release_key_path it's path of kaystore generated when exporting project apk.
i added hey hash generated facebook app still have error:
invalid key hash. key hash not match stored key hashes facebook android.
when add together hey hash generated java code works, can't each device, need publish app every 1 can utilize it.
what solution? please help me.
i have solved problem :d
so have release key hash, need install apk file in android emulator, , add together key generated next code facebook app:
try { packageinfo info = getpackagemanager().getpackageinfo( "com.org.package", packagemanager.get_signatures); (signature signature : info.signatures) { messagedigest md = messagedigest.getinstance("sha"); md.update(signature.tobytearray()); string sign = base64 .encodetostring(md.digest(), base64.default); log.e("my key hash:", sign); } } grab (namenotfoundexception e) { } grab (nosuchalgorithmexception e) { }
good luck!!
android facebook debugging hash release
No comments:
Post a Comment