Facebook API 从今天开始给出错误 [英] Facebook API gives Error from Today

查看:30
本文介绍了Facebook API 从今天开始给出错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

直到今天我的 facebook api 在 PHP 下运行良好.我没有改变任何东西.但是从今天开始,我收到以下错误:

till today my facebook api under PHP worked well. I did not change anything. But from today on i get the following error:

facebook 失败:错误:14094410:SSL 例程:SSL3_READ_BYTES:sslv3 警报握手失败/usr/bin/php/var/www/pas/www/cronjobs/cronjob.channelsActions.php

facebook failed: "error:14094410:SSL routines:SSL3_READ_BYTES:sslv3 alert handshake failure /usr/bin/php /var/www/pas/www/cronjobs/cronjob.channelsActions.php

有没有人知道我如何解决这个错误?

Has anybody got an idea, how i could solve that error?

推荐答案

这是因为 POODLE: SSLv3.0 漏洞 (CVE-2014-3566).

在今天宣布此漏洞后,包括 Facebook 在内的许多服务暂时完全禁用了 SSLv3,而且 Facebook 在其 PHP SDK 中使用了 SSLv3.

After this vulnerability was announced today, many services disabled SSLv3 completely for the time being, including Facebook, and it happens that Facebook uses SSLv3 in their PHP SDK.

我不确定您是否拥有与我相同的 Facebook PHP SDK 版本,但如果您拥有 base_facebook.php 文件,请找到以下行:

I am not sure if you have the same Facebook PHP SDK version as me, but if you have the base_facebook.php file, find the line:

$opts[CURLOPT_SSLVERSION] = 3;

并将其更改为不再允许 SSLv3 的值(查找列出的所有常量):

And change it to a value that does not allow SSLv3 any longer (find all constants listed):

$opts[CURLOPT_SSLVERSION] = CURL_SSLVERSION_DEFAULT;

或:

$opts[CURLOPT_SSLVERSION] = CURL_SSLVERSION_TLSv1;

或:

$opts[CURLOPT_SSLVERSION] = CURL_SSLVERSION_TLSv1_0;

这样 Facebook API 调用将使用 TLSv1.0 而不是 SSLv3.就我而言,这一行位于第 963 行的makeRequest($url, $params, $ch=null)"函数中,但根据您使用的 PHP SDK 版本,它可能会有所不同.

This way the Facebook API calls will use TLSv1.0 instead of SSLv3. In my case this line is in the "makeRequest($url, $params, $ch=null)" function at line 963, but depending on the version of the PHP SDK you're using it may differ.

这篇关于Facebook API 从今天开始给出错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆