使用的问题摘要:使用SDK 5.0.3,Build 140124.4c900f79fb0ada4
Unity Editor中会出现以下情况。
1)问题1已完成加载Facebook dll,但找不到版本信息
使用SDK 5.0.3,Build 140124.4c900f79fb0ada4
UnityEngine.Debug:Log(Object)
FbDebug:Info(String)
FB:Init(InitDelegate, String, Boolean, Boolean, Boolean, Boolean, Boolean, HideUnityDelegate, String) (at Assets/Facebook/Scripts/FB.cs:131)
FB:Init(InitDelegate, HideUnityDelegate, String) (at Assets/Facebook/Scripts/FB.cs:84)
FacebookManager:CallFBInit(Action`1) (at Assets/Scripts/Facebook/FacebookManager.cs:66)
MainMenuHandler:drawMainMenu() (at Assets/Scripts/Menus/MainMenuHandler.cs:125)
MainMenuHandler:OnGUI() (at Assets/Scripts/Menus/MainMenuHandler.cs:95)
loading dll: https://integrated-plugin-canvas- rsrc.fbsbx.com/rsrc/unity/lib/sdk_5.0/CanvasFacebook.dll
UnityEngine.Debug:Log(Object)
FbDebug:Log(String)
<LoadFacebookClass>c__Iterator5:MoveNext() (at Assets/Facebook/Scripts/FB.cs:341)
UnityEngine.MonoBehaviour:StartCoroutine(IEnumerator)
Facebook.EditorFacebook:OnAwake() (at Assets/Facebook/Scripts/EditorFacebook.cs:35)
Facebook.AbstractFacebook:Awake()
UnityEngine.GameObject:AddComponent()
Facebook.FBComponentFactory:GetComponent(IfNotExist)
Facebook.EditorFacebookLoader:get_fb() (at Assets/Facebook/Scripts/EditorFacebookLoader.cs:13)
CompiledFacebookLoader:Start() (at Assets/Facebook/Scripts/FB.cs:417)
Finished loading Facebook dll, but could not find version info
UnityEngine.Debug:LogWarning(Object)
FbDebug:Warn(String)
FB:OnDllLoaded() (at Assets/Facebook/Scripts/FB.cs:163)
CompiledFacebookLoader:Start() (at Assets/Facebook/Scripts/FB.cs:418)
2)问题2经常得到(但并不总是)即使我的互联网连接正常,解析主机也会超时
Resolving host timed out: integrated-plugin-canvas-rsrc.fbsbx.com
UnityEngine.Debug:LogError(Object)
FbDebug:Error(String)
<LoadFacebookClass>c__Iterator5:MoveNext() (at Assets/Facebook/Scripts/FB.cs:346)
问题:对于问题2,移动设备上是否会出现此错误?如何在我的应用程序中捕获此错误以正确处理它?</ p>
3)问题3问题:我的应用程序可以以某种方式订阅AppRequests以便我可以在我的应用程序中自动获取它们,或者我需要每隔X秒通过FB.API(&#34; / me / apprequests)轮询Facebook “......)?
4)问题4 - 无法在Unity Editor中启动AppRequestAsFriendSelector(但在移动设备上运行良好)
FacebookManager-CallAppRequestAsFriendSelector called successfully.
UnityEngine.Debug:Log(Object)
FacebookManager:CallAppRequestAsFriendSelector(String, String, String, String, String, String) (at Assets/Scripts/Facebook/FacebookManager.cs:186)
PopupHandler:askLifeFB() (at Assets/Scripts/Menus/PopupHandler.cs:231)
PopupHandler:drawButton(GUIContent, Action) (at Assets/Scripts/Menus/PopupHandler.cs:465)
PopupHandler:renderAskFriendsLife() (at Assets/Scripts/Menus/PopupHandler.cs:222)
PopupHandler:showPopup(Int32) (at Assets/Scripts/Menus/PopupHandler.cs:163)
UnityEngine.GUI:CallWindowDelegate(WindowFunction, Int32, GUISkin, Int32, Single, Single, GUIStyle)
System.NullReferenceException: Object reference not set to an instance of an object
在Facebook.FriendSelectorDialog + FriendList.SetCustomFilters(System.Collections.Generic.List 1 filters) [0x00000] in <filename unknown>:0
at Facebook.FriendSelectorDialog.OnInit () [0x00000] in <filename unknown>:0
at Facebook.FbSkinnedDialog.Init () [0x00000] in <filename unknown>:0
at Facebook.NativeDialog.ShowDialog[FriendSelectorDialog] (System.Collections.Generic.Dictionary
2 paramsDict,Facebook.FacebookDelegate callback,Facebook.ErrorDelegate errorCallback)[0x00000] in:0
UnityEngine.Debug:LOGERROR(对象)
FbDebug:错误(字符串)
Facebook.FallbackData:JSFallback(字符串)
Facebook.NativeDialog:ShowDialog(Dictionary`2,FacebookDelegate,ErrorDelegate)
Facebook.AsyncRequestFriendSelectorGet:ShowDialog的(FBResult)
Facebook.AsyncRequestDialogGet:CheckAndShowDialog(FBResult)
Facebook.c__Iterator0:的MoveNext()
External Call: fbUi("{\"message\":\"Help me unlock the next episode!\",\"filters\":null,\"data\":\"Ask_Give_Life,1\",\"title\":\"App Requests\",\"app_id\":\"1375338362720935\",\"locale\":\"en_US\",\"method\":\"apprequests\"}", "1");
UnityEngine.Application:ExternalCall(String, Object[])
Facebook.CanvasFacebook:JSFallbackUI(String, Dictionary`2, FacebookDelegate)
Facebook.FallbackData:JSFallback(String)
Facebook.NativeDialog:ShowDialog(Dictionary`2, FacebookDelegate, ErrorDelegate)
Facebook.AsyncRequestFriendSelectorGet:ShowDialog(FBResult)
Facebook.AsyncRequestDialogGet:CheckAndShowDialog(FBResult)
5)否则很棒!非常感谢您在Unity中改进Facebook集成。现在更容易测试我们可以在编辑器中获得一个令牌。
答案 0 :(得分:1)
感谢您的报告。就像本说我们会研究#1&amp; #2。
对于#3最佳做法是拥有一个玩家可以管理其请求的菜单。这样你就不必轮询X秒并且只从那里更新。
要扩展#4,自定义过滤器应该是json字符串,如下所示:
使用["all", {"name":"my filter", "user_ids":[<facebook_user_id>, <another_facebook_user_id>]}]
调用时FB.AppRequest()
。我们有特殊定义的密钥名称,例如all
,app_users
,可以列在列表中。更多自定义过滤器应该是json对象的形式,有两个键:name
和user_ids
,名称是显示的列表名称,user_ids是放在那里的facebook用户ID列表
感谢您的反馈,我希望这会有所帮助。