iOS 9上的Facebook 7.0.3登录问题

时间:2015-09-18 12:44:39

标签: ios unity3d ios9 facebook-unity-sdk

我在Xcode的日志中有这条消息:

-canOpenURL: failed for URL: "fbauth2:///" - error: "This app is not allowed to query for scheme fbauth2"

我的应用程序并没有打开Facebook应用程序,但Safari。

然后我在回调中出错了。

(在iOS8上一切都很好)

这里所有的日志:

on clicked btn game over facebook connect
UnityEngine.EventSystems.ExecuteEvents:Execute(GameObject, BaseEventData, EventFunction`1)
UnityEngine.EventSystems.TouchInputModule:ProcessTouchPress(PointerEventData, Boolean, Boolean)
UnityEngine.EventSystems.TouchInputModule:ProcessTouchEvents()

(Filename: /Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 64)

2015-09-18 14:42:29.386 numbersAddictL[12643:531372] -canOpenURL: failed for URL: "fbauth2:///" - error: "This app is not allowed to query for scheme fbauth2"
on clicked btn game over facebook connect
UnityEngine.EventSystems.ExecuteEvents:Execute(GameObject, BaseEventData, EventFunction`1)
UnityEngine.EventSystems.TouchInputModule:ProcessTouchPress(PointerEventData, Boolean, Boolean)
UnityEngine.EventSystems.TouchInputModule:ProcessTouchEvents()

(Filename: /Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 64)

2015-09-18 14:42:29.391 numbersAddictL[12643:531372] -canOpenURL: failed for URL: "fbauth2:///" - error: "This app is not allowed to query for scheme fbauth2"
-> applicationWillResignActive()
FbLogInWithReadPermissions - Error Response:
The operation couldn’t be completed. (com.facebook.sdk.login error 301.)

(Filename: /Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 64)

FbLogInWithReadPermissions - Error Response:
The operation couldn’t be completed. (com.facebook.sdk.login error 301.)

(Filename: /Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 64)

-> applicationDidEnterBackground()
-> applicationWillEnterForeground()
-> applicationDidBecomeActive()
2015-09-18 14:42:39.100 numbersAddictL[12643:531582] NSURLSession/NSURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9802)

2 个答案:

答案 0 :(得分:3)

对于iOS 9(使用Facebook iOS SDK),您可以向info.plist添加更多密钥。此错误可能与此有关。

<key>NSAppTransportSecurity</key>
<dict>
  <key>NSExceptionDomains</key>
  <dict>
    <key>facebook.com</key>
    <dict>
      <key>NSIncludesSubdomains</key> <true/>        
      <key>NSExceptionRequiresForwardSecrecy</key> <false/>
    </dict>
    <key>fbcdn.net</key>
    <dict>
      <key>NSIncludesSubdomains</key> <true/>
      <key>NSExceptionRequiresForwardSecrecy</key>  <false/>
    </dict>
    <key>akamaihd.net</key>
    <dict>
      <key>NSIncludesSubdomains</key> <true/>
      <key>NSExceptionRequiresForwardSecrecy</key> <false/>
    </dict>
  </dict>
</dict>

Facebook getting started

答案 1 :(得分:0)

在目录树中查看,然后仔细检查您正在修改的plist。如果您正在运行“测试”,请记住您仍需要更新并添加其他密钥到“主”plist(在祖父下而不是其后代)。此外,注册Facebook开发人员并尝试创建“示例测试版应用”对于“现有项目”。这将使您在不遵循传统发展轨迹方面偏离,而不会丢失数据和原始模板。 :)

我在SO上发现这个Q&amp; A非常有用,可能与你的问题有关: The developers of this app have not set up this app properly for Facebook Login?