我正在使用以下代码在REST API中获取用户详细信息:
$client = new \GuzzleHttp\Client();
$endpoint = "https://graph.facebook.com/me";
$response = $client->request('GET', $endpoint, ['query' => [
'access_token' =>$input['facebook_token'],
'fields' => 'id,name,location,gender,email,picture,birthday,link,first_name,last_name'
]]);
$statusCode = $response->getStatusCode();
$content = json_decode($response->getBody(), true);
几天前它运行良好,但现在抛出错误:
{
"success": false,
"message": [],
"data": "cURL error 35: OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to graph.facebook.com:443 (see http://curl.haxx.se/libcurl/c/libcurl-errors.html)"
}
我已经在ssl上创建了虚拟主机,但仍然无法正常工作?