Laravel 5.7 OpenSSL SSL_connect:与graph.facebook.com:443连接的SSL_ERROR_SYSCALL

时间:2019-02-28 07:22:23

标签: laravel facebook ssl-certificate

我正在使用以下代码在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上创建了虚拟主机,但仍然无法正常工作?

0 个答案:

没有答案