× Joomla Facebook Connect support forum

Topic-icon JFBConnect Overview problem Facebook API Error: name lookup timed out

Active Subscriptions:

None
Hello,

I have migrated my website to a single server and right now when i go to the overview tab i got this error

Facebook API Error: name lookup timed out

Here is the screenshot of the problem

File Attachment:


After some reading i thought the problem is because of curl but i have check my phpinfo and curl is enabled.
curl
CURL support 	enabled
CURL Information 	libcurl/7.15.5 OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5

can u guys help me please.

TQ
The topic has been locked.
Support Specialist
A name lookup timeout occurs when the your server can't get the IP address for a domain name. So, when cURL tries to go to "api.facebook.com" to get information about your application, it's unable to get the location that the request is going to.

I'd talk to your hosting provider about the DNS configuration of your server, as that's likely where the issue is.

Hope that helps, but if you need more info, just let me know,
Alex
The topic has been locked.
Active Subscriptions:

None
i dont think there is problem with name lookup. i have root access to the server. below is the output of my nslookup.
[root@news html]# nslookup api.facebook.com
Server:         8.8.8.8
Address:        8.8.8.8#53

Non-authoritative answer:
Name:   api.facebook.com
Address: 69.171.229.27

[root@news html]#
The topic has been locked.
Support Specialist
Shahrul,
I'm not a server guy, but will try to help how I can. Best I know is that cURL looks up DNS entries different than ping or nslookup does, which means that even if DNS is configured right for command line stuff, it may not be working for cURL.

A post I found had some suggestions for trying to telnet to the same server, which may use the same method as cURL, so I'd recommend that:
www.dslreports.com/forum/r21118794-probl...ons-and-PHP-and-CURL

If that fails, there's a suggestion to make cURL spit out more details of the error it's receiving, which we can help you do if necessary.

Let us know what you find,
Alex
The topic has been locked.
Active Subscriptions:

None
hi .. after browsing around in this forum i found this code and save to my server. the result shows that curl can access facebook api from our server.
<?php
$curlcontent="curl";
$curlstatus="Curl is not installed - This is a Problem";
if (function_exists('curl_init')) {
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,
'https://api.facebook.com/restserver.php');
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT
5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0');
curl_setopt($ch, CURLOPT_VERBOSE, 1);
$curlcontent = curl_exec($ch);
curl_close($ch);
$curlstatus="Curl is available but cannot access Facebook - This is a
problem ";
if (strlen($curlcontent)>6) {$curlstatus="Curl is available and can
access Facebook - All is OK";}
}
print $curlstatus;
print "\n";
print $curlcontent;
print "\n";
?>

u can check the result at www.agendadaily.com/curl.php
The topic has been locked.
Support Specialist
Awesome debugging. Can you try with the following URLs and make sure they work as well?
api.facebook.com/
api-read.facebook.com/
graph.facebook.com/
www.facebook.com/
api-video.facebook.com/

The last one really isn't necessary, but it's a possible URL that could be used (just not by JFBConnect normally).

If all of those work, I'm honestly not sure what the issue is. I'll do some more research, but this isn't an error we've heard of before, so I don't have any perfect solutions off-hand.

Thanks,
Alex
The topic has been locked.