How to solve curlexception 6 problem: name search error timeout on facebook new graph api

Hi, I am creating a facebook application using the new api chart, but it gives an error like

curlexception 6: name lookup time in facebook.php file.

The problem is that the same code works fine on another server and does not give this error. How to solve this error Please help me.

+3
source share
3 answers

I had the same problem when developing locally on a virtual machine. I solved this by increasing the latency of Curl Connect.

Search CURLOPT_CONNECTTIMEOUT = 10your facebook SDK. Try changing it to CURLOPT_CONNECTTIMEOUT = 30orCURLOPT_CONNECTTIMEOUT = 60

+10
source

: Facebook SDK 3.x CURLOPT_CONNECTTIMEOUT base_facebook.php facebook.php.

, , CURL_OPTS makeRequest (, , !):

$facebook = new Facebook(array(
       'appId' => $your['AppId'],
       'secret' => $your['AppSecret'],
       'cookie' => true
));

$facebook->CURL_OPTS['CURLOPT_CONNECTTIMEOUT'] = 30; 

. : - SSL- facebook fql : D

+3

base_facebook.php SDK CURLOPT_CONNECTTIMEOUT, 10 60...

0

Source: https://habr.com/ru/post/1794645/


All Articles