Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Facebook PHP SDK giving an error

Tags:

php

facebook

I'm trying to run the example that comes with Facebook's PHP SDK, however I'm getting the following error:

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:\wamp\www\fb\src\facebook.php on line 614

Any ideas what I'm doing wrong?

like image 723
Ali Avatar asked Mar 26 '11 17:03

Ali


People also ask

What is OAuthException on Facebook?

OAuthException: If you receive an OAuthException error, it means that Edgar doesn't have the correct permissions to access your Facebook accounts right now. The password may have been changed on Facebook or Facebook may have reset your security session.


1 Answers

The problem is cURL has not been configured to trust the server's HTTPS certificate, you can fix that by adding this line of code:

curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
like image 169
Rho Avatar answered Oct 06 '22 08:10

Rho