登录facebook sdk解决团结问题

时间:2013-10-29 05:51:22

标签: unity3d facebook-unity-sdk

当我在登录android(真实设备 - Gooogle nexus 7 2012)时使用facebook sdk统一时,我有一个问题。 - adb logcat这个错误: W / fb4a(:):BlueServiceQueue(10494):服务期间的异常 W / fb4a(:):BlueServiceQueue(10494):com.facebook.http.protocol.ApiException:密钥哈希rhDpGcyTNP33kRZOYIKdOcoevoM与任何存储的密钥哈希值都不匹配。 W / fb4a(:):BlueServiceQueue(10494):at com.facebook.http.protocol.ApiResponseChecker.b(ApiResponseChecker.java:83) W / fb4a(:):BlueServiceQueue(10494):at com.facebook.http.protocol.ApiResponseChecker.a(ApiResponseChecker.java:162) W / fb4a(:):BlueServiceQueue(10494):at com.facebook.http.protocol.ApiResponse.h(ApiResponse.java:239) W / fb4a(:):BlueServiceQueue(10494):at com.facebook.katana.server.protocol.AuthorizeAppMethod.a(AuthorizeAppMethod.java:272) W / fb4a(:):BlueServiceQueue(10494):at com.facebook.katana.server.protocol.AuthorizeAppMethod.a(AuthorizeAppMethod.java:29) W / fb4a(:):BlueServiceQueue(10494):at com.facebook.http.protocol.ApiResponseHandler.a(ApiResponseHandler.java:59) W / fb4a(:):BlueServiceQueue(10494):at com.facebook.http.protocol.ApiResponseHandler.handleResponse(ApiResponseHandler.java:29) W / fb4a(:):BlueServiceQueue(10494):at com.facebook.http.common.FbHttpRequestProcessor.a(FbHttpRequestProcessor.java:363) W / fb4a(:):BlueServiceQueue(10494):at com.facebook.http.common.FbHttpRequestProcessor.a(FbHttpRequestProcessor.java:179) W / fb4a(:):BlueServiceQueue(10494):at com.facebook.http.common.FbHttpRequestProcessor.b(FbHttpRequestProcessor.java:139) W / fb4a(:):BlueServiceQueue(10494):at com.facebook.http.common.FbHttpRequestProcessor.a(FbHttpRequestProcessor.java:237) W / fb4a(:):BlueServiceQueue(10494):at com.facebook.http.protocol.SingleMethodRunnerImpl.a(SingleMethodRunnerImpl.java:378) W / fb4a(:):BlueServiceQueue(10494):at com.facebook.http.protocol.SingleMethodRunnerImpl.a(SingleMethodRunnerImpl.java:156) W / fb4a(:):BlueServiceQueue(10494):at com.facebook.http.protocol.AbstractSingleMethodRunner.a(AbstractSingleMethodRunner.java:16) W / fb4a(:):BlueServiceQueue(10494):at com.facebook.katana.server.handler.PlatformOperationHandler.c(PlatformOperationHandler.java:366) W / fb4a(:):BlueServiceQueue(10494):at com.facebook.katana.server.handler.PlatformOperationHandler.a(PlatformOperationHandler.java:259) W / fb4a(:):BlueServiceQueue(10494):at com.facebook.fbservice.service.BlueServiceQueue.e(BlueServiceQueue.java:299) W / fb4a(:):BlueServiceQueue(10494):at com.facebook.fbservice.service.BlueServiceQueue.d(BlueServiceQueue.java:53) W / fb4a(:):BlueServiceQueue(10494):at com.facebook.fbservice.service.BlueServiceQueue $ 3.run(BlueServiceQueue.java:230) W / fb4a(:):BlueServiceQueue(10494):at java.util.concurrent.Executors $ RunnableAdapter.call(Executors.java:390) W / fb4a(:):BlueServiceQueue(10494):at java.util.concurrent.FutureTask.run(FutureTask.java:234) W / fb4a(:):BlueServiceQueue(10494):at com.facebook.common.executors.ListenableScheduledFutureImpl.run(ListenableScheduledFutureImpl.java:59) W / fb4a(:):BlueServiceQueue(10494):在android.os.Handler.handleCallback(Handler.java:725) W / fb4a(:):BlueServiceQueue(10494):在android.os.Handler.dispatchMessage(Handler.java:92) W / fb4a(:):BlueServiceQueue(10494):在android.os.Looper.loop(Looper.java:137) W / fb4a(:):BlueServiceQueue(10494):在android.os.HandlerThread.run(HandlerThread.java:60) W / Bundle(12430):键com.facebook.platform.protocol.PROTOCOL_VERSION期望String但值是java.lang.Integer。返回了默认值。 W / Bundle(12430):尝试转换生成的内部异常: W / Bundle(12430):java.lang.ClassCastException:java.lang.Integer无法强制转换为java.lang.String

..... .... V / FBUnitySDK(21692):发送到Unity OnLoginComplete({“cancelled:true}) I / Unity(21692):呼叫登录: I / Unity(21692): I / Unity(21692):(文件名:./ Runtime / ExportGenerated/AndroidManaged/UnityEngineDebug.cpp行:54) I / Unity(21692): I / Unity(21692):登录结果:{“is_logged_in”:false,“user_id”:“”,“access_token”:“”} I / Unity(21692): I / Unity(21692):(文件名:./ Runtime / ExportGenerated/AndroidManaged/UnityEngineDebug.cpp行:54)

  • 当我卸载Facebook应用程序时,此应用程序正常工作。
  • 我认为发生此错误是因为我的密钥哈希。 请帮我解决这个问题。 (对不起,我的英语不太好)

1 个答案:

答案 0 :(得分:3)

您传递给Facebook SDK的密钥哈希不会与您的开发者帐户一起存储。

W/fb4a(:):BlueServiceQueue(10494): com.facebook.http.protocol.ApiException: Key hash rhDpGcyTNP33kRZOYIKdOcoevoM does not match any stored key hashes. 

转到developers.facebook.com/apps/并将其添加到android部分(密钥哈希rhDpGcyTNP33kRZOYIKdOcoevoM)