1

I am using latest base_facebook.php https://github.com/facebook/facebook-php-sdk/blob/master/src/base_facebook.php in order to authenticate the user to my web application via facebook.

Everything was working fine until today. I am getting suddenly a message in my web application like this

Fatal error: Uncaught CurlException: 7: Failed to connect to 2a03:2880:10:6f01:face:b00c:0:8: Network is unreachable thrown in /var/www/pygmaxia2.gr/templates/pygmaxia2gr/base_facebook.php on line 977

Yesterday I was working normally and today all day long with no problem. The problem seemed to apear when I deleted a folder that I didn't need and was totally irrelevant with the file. When I do ctrl F5 for refresh with firefox, the message disappears and everything seems to work. But after a while It appears again just by clicking around in the page.

I have seen many have this problem but in my case there is no solution yet. The problem appears and disappears by itself without something visible causing it. I also need to mention that I am on a ubuntu 12.04 system and today I did an update. Do you think that it would disrupt the ipv6 related files? But still why is it going away periodically and then reappearing again? Also there is no firewall in my System.

Thank you

4 Answers 4

1

It seems that Facebook is down now in several country for more than an hour.... Just wait !

1

I'm having the exact same problem at the very moment, and it seems to me I can't connect to developers.facebook.com altogether.

1
1

Set Proxy To Connect Facebook.com

## Find Code In base_facebook.php ##

public static $CURL_OPTS = array(
        CURLOPT_CONNECTTIMEOUT => 10,
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_TIMEOUT        => 60,
        CURLOPT_USERAGENT      => 'facebook-php-3.2',
      );

And Add option

  public static $CURL_OPTS = array(
    CURLOPT_CONNECTTIMEOUT => 10,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_TIMEOUT        => 60,
    CURLOPT_USERAGENT      => 'facebook-php-3.2',
    CURLOPT_PROXY      => '199.200.120.140:8089',
  );
0

I encountered a similar curl exception since it was attempting to use IPv6 but was unable to. Could get it working after I forced curl to use IPv4 via curl_setopt(). Followed the suggestion in this link - http://www.tech-and-dev.com/2012/07/how-to-fix-facebook-connect-error.html

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.