I finished my application and every thing works fine but after i signed my app to publish it on google play the signed apk can not login with facebook and i tried below methods to solve this issue but nothing works at me till now.
I generated the hashkey by keytool and added it to my application page on facebook.
keytool -exportcert -alias kartag -keystore C:\Data\app\client\android\keyStore\KarTag | "C:\bin\bin\openssl" sha1 -binary |"C:\bin\bin\openssl" base64then entered android as password and entered my keystore password also but nothing works.
I wrote below code to got the hashkey at runtime and the generated key is different from generated by above method and added also in my facebook application page but i does not work too.
String key = ""; try { PackageInfo info = getPackageManager().getPackageInfo( "com.kartag.gui", 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)); key = Base64.encodeToString(md.digest(), Base64.DEFAULT); } } catch (NameNotFoundException e) { } catch (NoSuchAlgorithmException e) { }
Please if you know any method to solve this issue help as i spent three days untill now to solve this issue.