facebook PHP SDK SSL错误-为什么?
我们正在尝试使用facebook connect登录。 它在本地主机上工作,但在服务器上此行失败:facebook PHP SDK SSL错误-为什么?,php,facebook,Php,Facebook,我们正在尝试使用facebook connect登录。 它在本地主机上工作,但在服务器上此行失败: $user_profile = $facebook->api('/me'); 例外情况如下: object(FacebookApiException)#2 (8) { ["result":protected]=> array(2) { ["error_code"]=> int(60) ["error"]=> array(2) { ["message"]=>
$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"
}
}
}
确保已在Apache中启用
ssl\u模块
你可以这样做
LoadModule ssl_module modules/mod_ssl.so
您的fb\u ca\u chain\u bundle.crt可能需要更新。您可以在上找到最新版本 国家: 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的证书 我不确定这个答案在两个月后有多大帮助,但是更新这个文件对我来说很有效