Topic-icon Facebook API Error

Active Subscriptions:

None
11 years 10 months ago #45635 by layer77llc
Hello-
I have followed the installation guide but still seem to be getting this error. I do not yet have an SSL certificate for the site. Do I need one to make JFBConnect work? Or is this error something else?

Error

Facebook API Error: Unknown SSL protocol error in connection to graph.facebook.com:443

Facebook Application configuration could not be loaded. Please check your App ID and Secret Key
The topic has been locked.
Support Specialist
11 years 10 months ago #45643 by alzander
Replied by alzander on topic Facebook API Error
No, you do not need an SSL certificate installed on your site for JFBConnect, or Facebook integration in particular, to function.

Your server does need to be able to make outgoing connections to servers that have SSL certificates. From the error you describe, it sounds like the OpenSSL library is not properly configured on your site in order to make these types of outgoing connections. SSL is used by almost all social networks to encrypt private data about the users that are logging into your site. That SSL is installed on their server though, and your server needs to be able to communicate with their servers over the encrypted channel.

I'd recommend contacting your hosting provider to ensure that OpenSSL and outgoing secure connections are possible from your server.

I hope that helps, but if not, please let me know and we'll help however we can.

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

None
11 years 10 months ago #45647 by layer77llc
Replied by layer77llc on topic Facebook API Error
OpenSSL is configured and working on our site. (SSL Version OpenSSL/1.0.1c) I am fairly sure my system is configured properly because the Gmail registration works fine and the Facebook option works, but only from a mobile device or tablet. If I click on the Facebook button from a browser (tested multiple browsers on multiple systems) it doesn't do anything. ??? I feel like it has something to do with the error that I posted above when running AutoTune but I can't seem to figure out what is causing it. :o( Any help you can offer is greatly appreciated.

Daniel
The topic has been locked.
Support Specialist
11 years 10 months ago #45656 by alzander
Replied by alzander on topic Facebook API Error
Thanks for the updated information. A few things to note:
1) The OpenSSL version you have installed is out of date and is a version affected by the Heartbleed bug. Since you don't have an SSL certificate for your site, you aren't directly affected. If you ever install an SSL cert, you'll need to upgrade your OpenSSL. Otherwise, the version you're using *may* be part of the problem your having, but I doubt it.
2)The reason Facebook authentication isn't working is because your Gavick template is re-including the Facebook Javascript library, and that's conflicting with how JFBConnect has to initialize it's features. In the Autotune -> Error Check section, you should see a similar warning. When you disable the Gavick social integratino features, things should start working.
3) I'm not sure what's wrong with the Autotune -> Facebook App configuration. If you can't set the settings for your Application through Autotune, you'll need to do so manually. Mainly, ensure that the Site URL and Domain for your site are correct in the Facebook Developer Area .

I hope that helps get you started. You don't have to run the Autotune Facebook App setup process for authentication to work, it just makes things easier.

Alex
The topic has been locked.
Active Subscriptions:

None
11 years 10 months ago - 11 years 10 months ago #45660 by layer77llc
Replied by layer77llc on topic Facebook API Error
You sir...are the man! :o)

Disabling the template social integration fixed the problem. Autotune still throws errors but it's a start. Thank you!
Last edit: 11 years 10 months ago by layer77llc.
The topic has been locked.
Support Specialist
11 years 10 months ago #45665 by alzander
Replied by alzander on topic Facebook API Error
Glad to hear we're making progress. I'm not sure what the Autotune / SSL error is. If things are working though, I'd honestly say to skip it. Autotune is meant to be a tool to help get things setup in your Application. If things are already working, you don't really need to run it. Things like the Error Check tool should still work, and those are more important on an ongoing basis as we update the error checks periodically, making it easier to diagnose new issues that crop up with the social networks or various extensions.

If you really want us to investigate further, or certainly if you run into any issues, just let us know. We'll gladly help however we can.

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

None
11 years 10 months ago #45717 by layer77llc
Replied by layer77llc on topic Facebook API Error
Things are sort of working. The login/registration works but the redirect doesn't take the use to the page I specify in config. Instead of redirecting to the user's account page like I specified, it takes me to an error page with a long URL like this:

index.php?option=com_jfbconnect&task=authenticate.login&provider=facebook&return=L2dpdmUtYnVuZGx6P3ZpZXc9cGxhbiZ0YXNrPWxvZ2luJnBsYW5faWQ9MQ==&53e00f1caa89f0515c3f6e35143c08ba=1

Any help would be appreciated. Thanks!
The topic has been locked.
Support Specialist
11 years 10 months ago #45721 by alzander
Replied by alzander on topic Facebook API Error
That URL looks correct for a step in the authentication flow. You mention you're getting an error. Can you tell me what that error is? That will help us narrow things down further.

One other quick thing to try is, if you have any Social Profile plugins enabled, please disable them, temporarily, to see if that fixes the error during login.

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

None
11 years 10 months ago #45725 by layer77llc
Replied by layer77llc on topic Facebook API Error
After Facebook login, it just takes me to a page that says "35 Oops, you've encountered an error It appears the page you were looking for doesn't exist. Sorry about that."

It also doesn't actually log in and authenticate because if I go back to the homepage I'm not logged in. (The Google+ login works just fine.)

The only other social plugin installed is what comes with the Gavick template and I have disabled everything in the template settings.

I really hope I can get this working soon.
The topic has been locked.
Support Specialist
11 years 10 months ago #45737 by alzander
Replied by alzander on topic Facebook API Error
I'm sorry for the issues you've been running into. This isn't something we've heard of before, but have found a solution that some users using other systems (not JFBConnect) have said work when they run into this problem when connecting to Facebook.

Can you please edit the /administrator/components/com_jfbconnect/assets/facebook-api/base_facebook.php file. Around line 171, you'll see a section that looks like:
public static $CURL_OPTS = array(
        CURLOPT_CONNECTTIMEOUT => 10,
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_TIMEOUT => 60,
        CURLOPT_USERAGENT => 'facebook-php-3.2',
    );
Can you update that so it looks like:
public static $CURL_OPTS = array(
        CURLOPT_CONNECTTIMEOUT => 10,
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_TIMEOUT => 60,
        CURLOPT_USERAGENT => 'facebook-php-3.2',
        CURLOPT_SSLVERSION => 3
    );
The difference there is the addition of the SSLVERSION line at the bottom.

Please test and let me know if that helps. Again, that's just a guess, but from what we can tell, has worked for other users trying to implement Facebook integration.

Thanks,
Alex
The topic has been locked.