facebook集成登录问题canOpenURL:URL失败:“fbauth2:/” - 错误:“(null)”

时间:2015-12-12 12:48:14

标签: ios facebook facebook-ios-sdk

问题: canOpenURL:网址失败:“fbauth2:/” - 错误:“(null)”获取此错误

我正在使用ios 9.2 xcode 7.2

解决方案我试过了 1--我添加nsapptransport安全性

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

2 - 我添加了lsqueryscheema

<key>LSApplicationQueriesSchemes</key>
<array>
<string>fbapi</string>
<string>fbapi20130214</string>
<string>fbapi20130410</string>
<string>fbapi20130702</string>
<string>fbapi20131010</string>
<string>fbapi20131219</string>    
<string>fbapi20140410</string>
<string>fbapi20140116</string>
<string>fbapi20150313</string>
<string>fbapi20150629</string>
<string>fbauth</string>
<string>fbauth2</string>
<string>fb-messenger-api20140430</string>

3 - &GT;甚至也试试这个

    <key>LSApplicationQueriesSchemes</key>
    <array>
    <string>fbapi</string>
    <string>fb-messenger-api</string>
    <string>fbauth2</string>
    <string>fbshareextension</string>
    </array>

但仍有错误

1 个答案:

答案 0 :(得分:1)

你错过了导入FBSDKCoreKit吗?

failed for URL: “fbauth2://” - error: “(null)”

来自Facebook Docs

  

这是一个Xcode警告,指示canOpenURL:call返回false。只要您如上所述在plist中配置了LSApplicationQueriesSchemes条目,就可以忽略此警告

相关问题