Facebook Login for Android App with release key -
i trying release app on google play. have facebook login in app. until yesterday working fine till time running application debug.keystore
. when use own release key , sign application facebook doesn't login , cant seem figure out why.
followed link , did meth : so : key-hash-for-android-facebook-app
i changed machines, changed platforms (windows , mac osx ml) solution same issue. not log in. below code gives me proper hash key when use debug.keystore when sign application different keys same hashkey ( have come conclusion after lots of trials key wrong)
packageinfo info; try { info = getpackagemanager().getpackageinfo("com.you.name", packagemanager.get_signatures); (signature signature : info.signatures) { messagedigest md; md = messagedigest.getinstance("sha"); md.update(signature.tobytearray()); string = new string(base64.encode(md.digest(), 0)); //string = new string(base64.encodebytes(md.digest())); log.e("hash key", something); } } catch (namenotfoundexception e1) { log.e("name not found", e1.tostring()); } catch (nosuchalgorithmexception e) { log.e("no such algorithm", e.tostring()); } catch (exception e) { log.e("exception", e.tostring()); }
so there kind of steps need take when signing application release key. please help.
here did solved problem:
- used openssl-0.9.8e_win32 instead of openssl-0.9.8k_win32
- i not using alias in following or maybe entering space in alias because of key generated wrong.
i used instead:
keytool -exportcert -alias <aliasnameuseinreleasekeystore> -keystore <releasekeystorefilepath> | openssl sha1 -binary | openssl base64
p.s. method have posted in question useless. did nothing more confuse me no end.
Comments
Post a Comment