Wednesday 28 November 2012

Fatal error: Uncaught CurlException: 60: SSL certificate problem, verify that the CA cert is OK. - Solved


Sometimes you will get an error when you work with facebook apis. This will be like
Fatal error: Uncaught CurlException: 60: SSL certificate problem, verify that the CA cert is OK.
This can be fixed by adding the following two lines of code before just before you go for the api call.
Facebook::$CURL_OPTS[CURLOPT_SSL_VERIFYPEER] = false;
Facebook::$CURL_OPTS[CURLOPT_SSL_VERIFYHOST] = 2;

No comments:

Post a Comment