0

我们正在尝试使用 facebook connect 登录。它在本地主机上工作,但在此行的服务器上失败:

$user_profile = $facebook->api('/me');

有脸书例外:

object(FacebookApiException)#2 (8) {
["result":protected]=>
array(2) {
["error_code"]=>
int(60)
["error"]=>
array(2) {
  ["message"]=>
  string(146) "SSL certificate problem, verify that the CA cert is OK. Details:
 error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed"
   ["type"]=>
   string(13) "CurlException"
  }
 }
["message":protected]=>
string(146) "SSL certificate problem, verify that the CA cert is OK. Details:
 error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed"
["string":"Exception":private]=>
string(0) ""
["code":protected]=>
int(60)
["file":protected]=>
string(43) "C:\xampp\htdocs\taska\api\base_facebook.php"
["line":protected]=>
int(967)
["trace":"Exception":private]=>
array(5) {
[0]=>
array(6) {
  ["file"]=>
  string(43) "C:\xampp\htdocs\taska\api\base_facebook.php"
  ["line"]=>
  int(899)
  ["function"]=>
  string(11) "makeRequest"
  ["class"]=>
  string(12) "BaseFacebook"
  ["type"]=>
  string(2) "->"
  ["args"]=>
  array(2) {
    [0]=>
    string(29) "https://graph.facebook.com/me"
    [1]=>
    array(2) {
      ["method"]=>
      string(3) "GET"
      ["access_token"]=>
      string(48) "2750040a2d1e2"
    }
  }
}
4

2 回答 2

1

您的 fb_ca_chain_bundle.crt 可能需要更新。您可以在Facebook PHP SDK github 页面上找到最新版本。

Facebook 上的这个错误报告指出:

sdk 提供的 fb_ca_chain_bundle.crt 由 DigiCert High Assurance CA-3 发布,但 graph.facebook.com/ 使用来自 www.verisign.com/CPS Incorp.by Ref 的证书。LIABILITY LTD.(c)97 VeriSign

不确定这个答案在事后 2 个月有多大帮助,但更新这个文件对我有用。

于 2013-01-29T16:56:05.020 回答
1

确保您已ssl_module在 Apache中启用

你可以这样做

LoadModule ssl_module modules/mod_ssl.so
于 2012-11-29T17:12:41.793 回答