Facebook API on PHP 錯誤訊息 - certificate verify failed

Facebook php版本的API 會產生莫名其妙的錯誤,就算開啟了SSL也無法處理,出現異常訊息如下:

Facebook php-SDK usually make some strange message, it still does not work well even I used SSL module.

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:AppServwwwdemofacebooksrcfacebook.php on line 615<br></br>


After google, you can add two line of codes, sign it on yellow cross line area.

$opts[CURLOPT_SSL_VERIFYPEER] = false;<br></br>$opts[CURLOPT_SSL_VERIFYHOST] = 2;<br></br>


Search keyword 『URLOPT_POSTFIELDS』 and it will like this picture.


So this problem is solved.

參考資料 (Ref):


Web developer, focus on website fullstack, special JavaScript, and love sharing developing experience and communicate with developers. http://about.me/clonn