× Joomla Facebook Connect support forum

Topic-icon SCLogin Facebook Connect NOT WORKING

Active Subscriptions:

None
Hi there,

I have been working all day trying to get the login module working however, the connect with facebook button does not appear.

Firstly, I'm 100% sure confident it's setup all perfectly as I followed the instructions to a tee. I, set up a new facebook app after installing the component etc, populated the necessary data, updated the component config in the joomla backend.

No matter what I do, the newly published sclogin module will not display the facebook button. Instead, the text, 'Login With Facebook' appears with no link. From looking at the source/developer tools on the page I can see that there is a javascript error that pertains to the problem.

Here is the script (displayed from the body tag):

window.fbAsyncInit = function() {
FB.init({appId: '237060243049006', status: true, cookie: true, xfbml: true, oauth: true, channelUrl: 'https://www.learnthrusong.co.uk/components/com_jfbconnect/assets/jfbcchannel.php'});
};
(function(d){
     var js, id = 'facebook-jssdk'; if (d.getElementById(id)) {return;}
     js = d.createElement('script'); js.id = id; js.async = true;
     js.src="https://www.learnthrusong.co.uk/connect.facebook.net/en_GB/all.js"; // THIS IS THE LINE THAT LOOKS WRONG //
     d.getElementsByTagName('head')[0].appendChild(js);
   }(document));

Shouldn't that line look like:
 js.src="https://connect.facebook.net/en_GB/all.js"
?
The error that I get in console is "GET www.learnthrusong.co.uk/connect.facebook.net/en_GB/all.js 404 (Not Found)" which stands to reason as this file doesn't exist. I think that the problem is that, somewhere, the base url, i.e. "www.learnthrusong.co.uk/" is getting prepended to the full path which I know should be "connect.facebook.net/en_GB/all.js" as I checked and that is a JS file on facebook's site.

Also, I tried changing the 'assets/jfbcchannel.php' so that the

 // BECAME //

// However, this didn't change a thing.

I've now restored it and anything I've changed to default.

Other Info
My site is totally SSL'd (SSL ALL UP TO DATE) so you access the site from https ALWAYS. I'm using SH404 SEF in J1.5 which I thought may be part of the problem however, after disabling it (and joomla's built in SEF) it still doesn't work.

I've also switched the template to the standard joomla to no avail. Additionally, I've tried disabling all modules on the page that include any JS again, the module doesn't work.

I'm really baffled by this so please, any help would be massively appreciated ASAP as I needed to complete this already.

Thanks in advance!

Gez

P.S. I'll PM you access immediately this posts
The topic has been locked.
Active Subscriptions:

None
14 years 3 months ago #19165 by learnthrusong
Hi there,

I forgot to mention, I can see by inspecting the element that the FBML tags are there/have been rendered in the source, I think that the key here is that it's missing the JS file because the link has my site BASE URL prepended as I mentioned in earlier message.

Kind Regards,

Gez
The topic has been locked.
Support Specialist
14 years 3 months ago #19168 by alzander
Gez,
Something is changing the URL you point to above for the Facebook Javascript library. When we insert the link on the page, it looks like:
"connect.facebook.net/en_GB/all.js"
There is no http or https, which is a way to be compatible with both http and https. Something on your site (your template, an 'optimization' plugin, or something else) is looking at that link and trying to convert it from a relative link to a link on your site. That's the wrong behavior, and you need to disable whatever it is that's doing that.

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

None
14 years 3 months ago #19171 by learnthrusong
Hi Alex,

I have SEF disabled though, very confused???

I'm using a htaccess rewriting so, should I comment out those too?

Please, do you have time to look at this? I'm really under pressure to get this done.

Best wishes,

Gez
The topic has been locked.
Support Specialist
14 years 3 months ago #19172 by alzander
This is not an SEF issue. Some extension is changing all links that it thinks are relative links to full-path links. Joomla SEF does not do this when enabled, so it's something else.

I don't know what extensions you have installed on your site. I'd recommend disabling any system plugins you have that may be doing this. We don't know your site, and this isn't something caused by JFBConnect. Some other extension is modifying our links. You'll need to narrow down what extension is doing that and fix or disable it. htaccess should not be modifying the HTML output for the page, but trying without the htaccess file is worth a shot.

Hope that explains some more,
Alex
The topic has been locked.
Active Subscriptions:

None
14 years 3 months ago #19176 by learnthrusong
I'm using SH404 SEF with mod_rewrite.

I've also tried to make that link explicitly "connect.face..." which didn't do anything.

Any more ideas...? Please could you take a look at the site?

Cheers,

Gez
The topic has been locked.
Support Specialist
14 years 3 months ago #19177 by alzander
Gez,
We don't change the configuration of other extensions as that can cause other issues. We'll gladly change options within JFBConnect if they would help, but from what's happening the problem is not within JFBConnect at all, so looking at the admin area likely won't help.

Can you try disabling sh404SEF and see if that fixes the problem? Again, you'll need to narrow down what extension is causing the problem. We don't know what extensions you have installed, and haven't tested with every possible extension. Once you narrow it down, we can gladly try to help further, but the issue is not within JFBConnect.

The link is actually generated in the /plugins/system/jfbcsystem.php file. The channel.php file you modified is for something else. If you want to work around the conflict, you can edit the jfbcsystem.php file, but please be aware that you will need to make that change with every update of JFBConnect in the future.

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

None
14 years 3 months ago #19178 by learnthrusong
Great,

FYI - I have tried disabling SH404 SEF and Joomla SEF and .htaccess file... None of which worked however, adding the 'https:' in the system plug file works... well, I have a login button and comments seem to work so pretty much there!

So, Thanks for that!

Gez
The topic has been locked.
Support Specialist
14 years 3 months ago #19179 by alzander
No problem. Hopefully you won't run into issues with other extensions that use links to other resources, but the main thing is that it works!

Best of luck, and should you run into anything else, just let us know.

Alex
The topic has been locked.
Active Subscriptions:

None
14 years 3 months ago #19180 by learnthrusong
Thks Alex!

1 off topic question - If I have custom tags in my facebook application (open graph) for example, an action such as 'Finished Workshop', can I add those as open graph tags the same as standard ones?

Many thanks,

Gez
The topic has been locked.