【问题标题】:iOS 10 Facebook graph.facebook.com SSL Error - FBSDK secure network request failediOS 10 Facebook graph.facebook.com SSL 错误 - FBSDK 安全网络请求失败
【发布时间】:2016-11-09 13:10:05
【问题描述】:

经过一周的研究,我还是无法解决这个错误:

发生 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>

我还启用了钥匙串共享。

我想我已经尝试了在互联网上找到的所有解决方案,但仍然没有运气。

任何帮助将不胜感激。

【问题讨论】:

    标签: ios facebook facebook-graph-api ssl


    【解决方案1】:

    所以在我认为我找到了错误的答案之后。

    我正在使用 https 从图形 api 加载配置文件图像,它应该通过 http 加载。

    例子:

    https://graph.facebook.com/facebook_user_id/picture?type=large
    

    应该是

    http://graph.facebook.com/facebook_user_id/picture?type=large
    

    请注意 https 协议中缺少 s,这是关键的区别。

    【讨论】:

      猜你喜欢
      • 2015-12-18
      • 2020-04-09
      • 2017-12-27
      • 2018-01-09
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多