Facebook PHP SDK出现错误 [英] Facebook PHP SDK giving an error
问题描述
我正在尝试运行Facebook的PHP SDK附带的示例,但是出现以下错误:
I'm trying to run the example that comes with Facebook's PHP SDK, however I'm getting the following error:
致命错误:未捕获的CurlException: 60:SSL证书问题,请验证 该CA证书还可以.细节: 错误:14090086:SSL 例程:SSL3_GET_SERVER_CERTIFICATE:证书 验证失败抛出 C:\ wamp \ www \ fb \ src \ facebook.php在 614行
Fatal error: Uncaught CurlException: 60: SSL certificate problem, verify that the CA cert is OK. Details: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed thrown in C:\wamp\www\fb\src\facebook.php on line 614
有什么想法我在做什么错吗?
Any ideas what I'm doing wrong?
推荐答案
问题是尚未将cURL配置为信任服务器的HTTPS证书,您可以通过添加以下代码行来解决该问题:
The problem is cURL has not been configured to trust the server's HTTPS certificate, you can fix that by adding this line of code:
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
这篇关于Facebook PHP SDK出现错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!