PHP: Facebook SDK – SSL – CURL doesn’t verify a certificate


PHP: Facebook SDK – SSL – CURL doesn’t verify a certificate

If we use Facebook SDk and receive an error like:

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:\AppServ\www\xxx\fb\src\base_facebook.php on line 889

Open file base_facebook.php

Goto line 873 and add two line

$opts[CURLOPT_SSL_VERIFYPEER] = false;
	$opts[CURLOPT_SSL_VERIFYHOST] = false;

Now, code run well

Leave a Reply