简体   繁体   English

Android + Facebook SDK

[英]Android + facebook sdk

I am trying include facebook authentication into my app. 我正在尝试在我的应用程序中包含Facebook身份验证。 I've created hash key with 我已经创建了哈希键

keytool -exportcert -alias androiddebugkey -keystore ~/.android/debug.keystore | openssl sha1 -binary | openssl base64

then i've added this hash into appDashboard. 然后我已将此哈希添加到appDashboard中。

APK without sign works fine, but when i trying buid signed APK from android studio(Build-Generate Signed APK), i have error about mismatched hashkey... 无符号的APK工作正常,但是当我尝试从Android Studio进行Buid签名的APK(Build-Generate Signed APK)时,我遇到了关于不匹配的hashkey的错误...

could anybody help me fix this problem? 有人可以帮我解决这个问题吗? Thx! 谢谢!

Please refer this page: http://developer.android.com/tools/publishing/app-signing.html 请参考此页面: http : //developer.android.com/tools/publishing/app-signing.html

Once you obtain your private key(which should be kept very safely and you should not lose it ever, atleast for 25 years) use that key to sign the application and to generate a hash for Facebook dashboard. 一旦获得私钥(应该非常安全地保存,并且至少25年就不会丢失),请使用该密钥对应用程序进行签名并为Facebook仪表板生成哈希。

Refer this for steps: https://developers.facebook.com/docs/android/getting-started/ Under Create a Facebook App search this command that uses your release(google dev key) 请参阅此步骤: https : //developers.facebook.com/docs/android/getting-started/在“创建Facebook应用程序”下,搜索使用您的发行版的此命令(Google开发密钥)

keytool -exportcert -alias <RELEASE_KEY_ALIAS> -keystore <RELEASE_KEY_PATH> | openssl sha1 -binary | openssl base64

That should do it. 那应该做。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM