php - Facebook Graph API 偶发错误 : Peer certificate cannot be authenticated with known CA certificates

标签 php facebook facebook-graph-api ssl

我正在使用 PHP SDK 开发 Facebook SDK 应用程序。 但是我收到 SSL 请求错误,并且仍然从 2 小时前继续。(大约 5 月 1 日 0:00 UTC+0)

当我使用 curl 向 Facebook GraphAPI 发送请求时,

$ curl https://graph.facebook.com

curl: (60) Peer certificate cannot be authenticated with known CA certificates

此错误发生在linux上(我通过Amazon Linux和CentOS6.4检查过),但有时会得到正常的JSON响应。 (尝试10req,9是错误,1是有效的JSON)

并且不会出现在 OSX(marvericks) 上

使用来自 github 上的 FB PHP SDK 的 cacert,除了 OSX 之外,这仍然发生在 linux 上。

$ wget https://raw.githubusercontent.com/facebook/facebook-php-sdk-v4/4.0-dev/src/Facebook/HttpClients/certs/DigiCertHighAssuranceEVRootCA.pem
$ curl https://graph.facebook.com --cacert DigiCertHighAssuranceEVRootCA.pem

curl: (60) Peer certificate cannot be authenticated with known CA certificates

所以我很快修复了禁用 PHP SDK 上的 SSL 检查。 我的 Linux 服务器上是否缺少任何设置?

最佳答案

这可能与今天早些时候 graph.facebook.com 的 SSL 问题有关。现在应该已经解决了:https://developers.facebook.com/status/issues/1653352648231195/

关于php - Facebook Graph API 偶发错误 : Peer certificate cannot be authenticated with known CA certificates,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29980514/

相关文章:

android - 如何将 LoginResult 从 Facebook 登录传递到 Android 中的 Intent

php - 如何在 laravel 中动态禁用和启用外键检查?

php - Web Profiler 未显示在开发中

windows-server-2008 - PHP 邮件不会从 Windows Server 2008 发送

iOS Swift 和 Facebook SDK

Facebook Graph API 返回的好友数量与 Facebook 个人资料不一致

php - 在 Magento PHP 中显示之前检查文件是否存在?

facebook - 添加来自用户的申请

facebook-graph-api - https ://graph. facebook.com/debug_token 是否仅适用于应用程序开发人员?

node.js - 创建 OAuth API 时的应用程序 token / secret