I\'m working on an Android app, in which I want to integrate a Facebook posting feature. I downloaded the Facebook-Android SDK, and I got the readme.md (text file) in there,
Simply Open you Main Activity File and create below mention function:
try {
PackageInfo info = getPackageManager().getPackageInfo(
"your.application.package.name",
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 (PackageManager.NameNotFoundException e) {
} catch (NoSuchAlgorithmException e) {
}
1.1 Run you Application, this will generate a Hash key for your application.
Now, Open log cat and search with "KeyHash" and copy the hash key.
One you generate the Hash key you can remove this function.