I\'m building an app in which users can log in with Facebook.
I\'ve created the hash keys like following:
try {
PackageInfo info = getPackag
// add this method to your first activity and open log and search for Base64 tag this is the Hashkey i hoop it help
public void getHashkey(){
try {
PackageInfo info = getPackageManager().getPackageInfo(getApplicationContext().getPackageName(), PackageManager.GET_SIGNATURES);
for (Signature signature : info.signatures) {
MessageDigest md = MessageDigest.getInstance("SHA");
md.update(signature.toByteArray());
Log.i("Base64", Base64.encodeToString(md.digest(),Base64.NO_WRAP));
}
} catch (PackageManager.NameNotFoundException e) {
Log.d("Name not found", e.getMessage(), e);
} catch (NoSuchAlgorithmException e) {
Log.d("Error", e.getMessage(), e);
}
}