参见英文答案 > This app has no Android Key hashes configured. – Login with Facebook SDK 3个
当我运行我的Facebook应用程序时,我收到以下错误.允许密钥.在http://developers.facebook.com/apps/178779105632639配置您的应用密钥哈希值…
任何的想法?
解决方法:
看来你生成的hashkey不正确.您可以从以下代码生成应用程序哈希键.试试吧
public static void showHashKey(Context context) {
try {
PackageInfo info = context.getPackageManager().getPackageInfo(
"com.example.project", PackageManager.GET_SIGNATURES); //Your package name here
for (Signature signature : info.signatures) {
MessageDigest md = MessageDigest.getInstance("SHA");
md.update(signature.toByteArray());
Log.v("KeyHash:", Base64.encodetoString(md.digest(), Base64.DEFAULT));
}
} catch (NameNotFoundException e) {
} catch (NoSuchAlgorithmException e) {
}
}