Topic-icon i installed the new jfbconnect and getting this error -

Active Subscriptions:

None
I installed the new jfbconnect and the corresponding jomsocial plugin - is there anything else i am missing ?

I get this error when I try to login and create a new account via the jfb facebook login button.

Facebook API Error: Failed to connect to 2a03:2880:2110:3f04:face:b00c:0:1: Network is unreachableFacebook API Error: Parser error: unexpected 'FROM' at position 8.

Though I disabled ipv6 on my server - I believe that there are something things that are still using it - i see some in the logs.
The topic has been locked.
Support Specialist
That error occurs when your server has DNS enabled for IPv6, but not for actual transport of data. It's unfortunately a somewhat common occurrence and obviously leads to problems.

We're working on an update to JFBConnect that will work in that situation, but will cause slight delays. Basically, we'll detect if the IPv6 request was unsuccessful and try again with IPv4. That will be for every request though (during logins, and such, not on every page load, thankfully). Obviously, we'd really recommend disabling IPv6 entirely, or fully enabling it. Otherwise, we can give you a brief code snippet that will do the IPv4 stuff for now that will be part of the next release.

Hope that helps,
Alex
The topic has been locked.
Active Subscriptions:

None
13 years 10 months ago #24847 by mjh5598
can you send me the fix ?
I have tried to disable where possible..but in the logs it still keeps on showing up.
thanks
The topic has been locked.
Support Specialist
Edit the /administrator/components/com_jfbconnect/assets/facebook-api/base_facebook.php file. At line 908, you'll see:
curl_setopt_array($ch, $opts);
$result = curl_exec($ch);
After that line, add the following block:
if ($result === false && empty($opts[CURLOPT_IPRESOLVE])) {
  $matches = array();
  $regex = '/Failed to connect to ([^:].*): Network is unreachable/';
  if (preg_match($regex, curl_error($ch), $matches)) {
    if (strlen(@inet_pton($matches[1])) === 16) {
      if ($jfbcConfigModel->getSetting('facebook_display_errors'))
      {
         $app = JFactory::getApplication();
         $app->enqueueMessage('Invalid IPv6 configuration on server, Please disable or get native IPv6 on your server.');
      }
      self::$CURL_OPTS[CURLOPT_IPRESOLVE] = CURL_IPRESOLVE_V4;
      curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
      $result = curl_exec($ch);
    }
  }
}

If JFBConnect is set to display errors, then the error message above will be posted to the page so that you can be sure the following code is running (and that IPv6 has issues so IPv4 is being fallen back to).

Let us know how that goes. That code is going to be going into the next release and we really haven't been able to test it. Would love to hear your feedback!

Thanks,
Alex
The topic has been locked.
Active Subscriptions:

None
13 years 10 months ago #24872 by mjh5598
I have entered the code you have suggested, now I get this error :

Facebook API Error: Parser error: unexpected 'FROM' at position 8.
The topic has been locked.
Support Specialist
Looking at your original post, it seems like you were getting that error before as well.. just after the first IPv6 one. So, it looks like the IPv6 problem is likely fixed, but the 2nd one isn't.

When that happens, are you still logged into the site? Is profile information imported? Can you let us know if you disable the JFBConnect - JomSocial profile plugin if the error goes away? Knowing those answers will help narrow down a possible solution.

Thanks,
Alex
The topic has been locked.
Active Subscriptions:

None
13 years 10 months ago #24894 by mjh5598
Ok - I get the error when I push the facebook login button and i am directed to the screen where I am prompted to create a username and password for joomla
When I disable the JFBConnect - JomSocial profile plugin -- this error does go away - but I am still left at the same screen where I have enter a username and password - so joomla can create an account.

I hope this helps you help me :)
The topic has been locked.
Support Specialist
Hmm.. from here, we'll need to narrow it down further as to what in the JomSocial plugin is throwing that error. It's not one we've heard of before, so sorry you'll have to be the guinea pig.

Can you try disabling the avatar import and/or start un-mapping some of the profile fields you request about the user. As you disable each one, try to login and go to the Login / Register page and see if the error goes away. If so, let us know what setting it was that seems to throw the error.

As for the screen where you enter a username/password, that's normal behavior of JFBConnect if you have the "Registration Flow" setting at "Normal". If you want all the info filled in and an account created automatically, you should change that to Automatic. If that's what you're looking for, it's possible (though unlikely) that Automatic will get rid of that error too.

Let us know if that helps, and good luck!
Alex
The topic has been locked.