本文介绍了Android KeyHash调试时有效,而我从APK安装应用程序时无效的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用获得了KeyHash.当然,我将此(密钥哈希,程序包名称和主要活动类)复制到了Facebook设置据此.

I got KeyHash using this.Of course, I copied this (KeyHash, package name and main activity class) to facebook settings according this.

当我调试我的应用程序时,它看起来不错(我可以登录和注销我想要的次数),但是当我创建APK并运行该应用程序时,我收到了常见错误无效的密钥哈希,该密钥哈希与任何存储的哈希都不匹配密钥哈希..."

And when I debug my app it looks fine (I can login and logout how many times I want), but when I create APK and run the app I received common error "invalid key hash the key hash does not match any stored key hash..."

除了正确设置KeyHash并将其添加到您的Facebook App ID的Android设置之外,我还需要什么?

What do I need to except getting right KeyHash and adding it into your Facebook App ID's Android settings?

推荐答案

您必须致电

FacebookSdk.sdkInitialize(getApplicationContext());

致电

FacebookSdk.getApplicationSignature(getApplicationContext());

避免获得 NULL

to avoid getting NULL

这对我来说很好.

这篇关于Android KeyHash调试时有效,而我从APK安装应用程序时无效的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-14 23:11