[英]iOS9 Facebook Login canOpenURL error
我使用iOS9和Xcode7遇到了Facebook SDK 4.6的问题。
在设备上进行测试时,单击登录按钮时没有任何反应,在iOS模拟器中,我收到错误。
2015-10-01 17:12:32.197 TestProject[32112:797172] -canOpenURL: failed for URL: "fbauth2:///" - error: "(null)"
在我的plist文件中,我包括以下内容
<key>NSAppTransportSecurity</key>
<dict>
<!--Include to allow all connections (DANGER)-->
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
<key>LSApplicationQueriesSchemes</key>
<array>
<string>fbauth</string>
<string>fbapi</string>
<string>fb-messenger-api</string>
<string>fbauth2</string>
<string>fbshareextension</string>
</array>
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLSchemes</key>
<array>
<string>fb{FACEBOOK_APP_ID}</string>
</array>
</dict>
</array>
<key>FacebookAppID</key>
<string>{FACEBOOK_APP_ID}</string>
<key>FacebookDisplayName</key>
<string>{Your App Name}</string>
这只是一个运行时警告,让您知道手机上没有安装处理该Scheme的应用程序。
Facebook的文档甚至有一个关于它的说明:
这是一个Xcode警告,指示canOpenURL:call返回false。 只要您如上所述在plist中配置了LSApplicationQueriesSchemes条目,就可以忽略此警告
https://developers.facebook.com/docs/ios/ios9
你可以分享你的AppDelegate的代码和你试图登录的代码吗? 也许有什么东西......
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.