经过一周的研究,我无法解决这个错误:
发生SSL错误,无法与服务器建立安全连接。
_kCFStreamErrorCodeKey=-9802
NSErrorFailingURLStringKey=https://graph.facebook.com/v2.5
_kCFStreamErrorDomainKey=3
来自Info.plist的片段:
<?xml version="1.0" encoding="UTF-8"?>
<key>keychain-access-groups</key>
<array>
<string>$(AppIdentifierPrefix)APP_ID</string>
</array>
<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>graph</string>
<string>fb-messenger-api20140430</string>
<string>fb-messenger-api</string>
<string>fbshareextension</string>
<string>fb-messenger-platform-20150128</string>
<string>fb-messenger-platform-20150218</string>
<string>fb-messenger-platform-20150305</string>
</array>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true />
<key>NSExceptionDomains</key>
<dict>
<key>facebook.com</key>
<dict>
<key>NSIncludesSubdomains</key>
<true />
<key>NSExceptionRequiresForwardSecrecy</key>
<false />
<key>NSTemporaryExceptionAllowsInsecureHTTPLoads</key>
<true />
<key>NSTemporaryExceptionMinimumTLSVersion</key>
<string>TLSv1.2</string>
</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>
我还启用了钥匙串共享功能。
我想我已经尝试过在互联网上找到的所有解决方案但仍然没有运气。
非常感谢任何帮助。
答案 0 :(得分:0)
所以,在我认为我找到错误的答案之后。
我正在使用https从图表api加载个人资料图片,它应该通过http加载。
示例:
https://graph.facebook.com/facebook_user_id/picture?type=large
应该是
http://graph.facebook.com/facebook_user_id/picture?type=large
请注意https协议中缺少的,这是关键区别。