我对新的FBSDK有个问题。每当我尝试调用登录方法logInWithReadPermissions时,都会收到以下错误消息:
错误:"canOpenUrl : failed for url "fbauth2://“
:"(null)”
我的配置.plist文件遵循dev.facebook上的ios9 tuto ( https://developers.facebook.com/docs/ios/ios9 )。因此,我得到了NSAppTransportSecurity字典和LSApplicationQueriesSchemes数组(上面有字符串"fbauth2“)
你知道如何解决这个错误吗?
发布于 2015-10-03 13:59:41
1]在Developer.facebook中进行身份验证并生成类似于:=>460481580805052的Facebook Id
2]从构建设置中设置Bitcode :否
3]设置Plist文件
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLSchemes</key>
<array>
<string>fb460481580805052</string>
</array>
</dict>
</array>
<key>FacebookAppID</key>
<string>460481580805052</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSExceptionDomains</key>
<dict>
<key>akamaihd.net</key>
<dict>
<key>NSIncludesSubdomains</key>
<true/>
<key>NSThirdPartyExceptionRequiresForwardSecrecy</key>
<false/>
</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>
</dict>
</dict>
<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>
<string>fb-messenger-platform-20150128</string>
<string>fb-messenger-platform-20150218</string>
<string>fb-messenger-platform-20150305</string>
</array>
4]下载4个Sdk框架,如
=>Bolts.framework
=>FBSDKCoreKit.framework
=>FBSDKLoginKit.framework
=>FBSDKShareKit.framework
发布于 2015-09-21 23:53:41
如果你仍然有问题,重置模拟器,这对我很有效。
发布于 2015-08-24 11:27:27
我也有同样的问题,但我解决了Google+更新的最后版本4.6.0!
记得在更新后更改plist密钥LSApplicationQueriesSchemes
,如下所示:
<key>LSApplicationQueriesSchemes</key>
<array>
<string>fbapi</string>
<string>fb-messenger-api</string>
<string>fbauth2</string>
<string>fbshareextension</string>
</array>
https://stackoverflow.com/questions/31991525
复制相似问题