简体   繁体   English

登录facebook sdk解决团结问题

[英]Login facebook sdk for unity problems

I have a prolem when i used facebook sdk for unity when login on android (real device - Gooogle nexus 7 2012). 当我在登录android(真实设备 - Gooogle nexus 7 2012)时使用facebook sdk统一时,我有一个问题。 - adb logcat this error: W/fb4a(:):BlueServiceQueue(10494): Exception during service W/fb4a(:):BlueServiceQueue(10494): com.facebook.http.protocol.ApiException: Key hash rhDpGcyTNP33kRZOYIKdOcoevoM does not match any stored key hashes. - 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.commo 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.commo n.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.f n.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。 F bservice.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): at android.os.Handler.handleCallback(Handler.java:725) W/fb4a(:):BlueServiceQueue(10494): at android.os.Handler.dispatchMessage(Handler.java:92) W/fb4a(:):BlueServiceQueue(10494): at android.os.Looper.loop(Looper.java:137) W/fb4a(:):BlueServiceQueue(10494): at android.os.HandlerThread.run(HandlerThread.java:60) W/Bundle ( bservice.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): Key com.facebook.platform.protocol.PROTOCOL_VERSION expected String but value was a java.lang.Integer. 12430):key com.facebook.platform.protocol.PROTOCOL_VERSION expected String但value是java.lang.Integer。 The default value was returned. 返回了默认值。 W/Bundle (12430): Attempt to cast generated internal exception: W/Bundle (12430): java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.String W / Bundle(12430):尝试转换生成的内部异常:W / Bundle(12430):java.lang.ClassCastException:java.lang.Integer无法强制转换为java.lang.String

..... .... V/FBUnitySDK(21692): sending to Unity OnLoginComplete({"cancelled":true}) I/Unity (21692): call login: I/Unity (21692): I/Unity (21692): (Filename: ./Runtime/ExportGenerated/AndroidManaged/UnityEngineDebug.cpp Line: 54) I/Unity (21692): I/Unity (21692): login result: {"is_logged_in":false,"user_id":"","access_token":""} I/Unity (21692): I/Unity (21692): (Filename: ./Runtime/ExportGenerated/AndroidManaged/UnityEngineDebug.cpp Line: 54) ..... .... 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)

  • When i uninstall facebook app, this app working fine. 当我卸载Facebook应用程序,这个程序工作正常。
  • I think this error occur because my key hash. 我认为这个错误发生是因为我的密钥哈希。 Please help me out this problem. 请帮我解决这个问题。 (Sorry my english not good) (抱歉我的英语不好)

The key hash you're passing to the Facebook SDK isn't stored with your developer account. 您传递给Facebook SDK的密钥哈希不会与您的开发者帐户一起存储。

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

Go to developers.facebook.com/apps/ and add it in the android section (key hash rhDpGcyTNP33kRZOYIKdOcoevoM) 转到developers.facebook.com/apps/并将其添加到android部分(密钥哈希rhDpGcyTNP33kRZOYIKdOcoevoM)

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

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