Topic-icon Can't get "Login With Facebook" to work.

Active Subscriptions:

None
12 years 9 months ago #11956 by pdxfixit
AWESOME. Thanks for the fix, alzander.

I'm not very good at RegEx (I use a bad crutch -- RegexMagic ), but maybe, for the 4.0 release, change that regex so that is looks for the last instance of "
The topic has been locked.
Support Specialist
12 years 9 months ago #11957 by alzander
I'm assuming you were going to say the last instance of body (our forum is very strict about stripping out things... a little too much so). Unfortunately, that still wouldn't fix your case, since it would always put it on the solo default body tag for IE9 or non-IE browsers. For IE8, IE7 or IE6, the 'other' body tags would be used which wouldn't have the proper code. So, instead of only working for IE6 (how it was), it would then only work for IE9, Chrome, Firefox, and Safari. Better, definitely, but still not perfect.

I've been thinking about it today and honestly don't know a universal fix that would work for your case (and not break everyone else). We'll keep thinking about it, but in all honesty, keep the fix above in mind when you 4.0 is released and you upgrade to it.

Anyways, glad we could help, and definitely let us know if you run into any other issues we can help with.

Good luck,
Alex
The topic has been locked.
Active Subscriptions:

None
12 years 9 months ago #11959 by pdxfixit
Your assumption was correct. ;-) And very good point about which browser would get affected.

Have you guys considered putting the relevant JS code at the bottom of the document, just before the closing body tag? (like Google Analytics used to do)
Sure, it won't get loaded until the very end of the page-load, but it might be more consistent.

OR (and I haven't thought this one thru) -- maybe use JS itself to insert the code based on the actual DOM being used. (that way there's no confusion about which body tag is the correct one)

Just sharing a thought. Thanks for being receptive.
The topic has been locked.
Support Specialist
12 years 9 months ago #11960 by alzander
No problem for sharing the thoughts. We love feedback of any sort around here.

The Javascript code itself is meant to load asynchronously (so it doesn't block the rest of the page from loading). Because of that, it should be at the top of the page. It does work at the bottom, and about a year ago, that's where it was.. but we moved it to the top per recommendations by Facebook and for an overall performance benefit - At the end, it loads more or less sequentially.. at the beginning and asynchronously, it loads concurrently.

As for using JS to load, that's fraught with some issues too as you generally can't reliably detect the opening body tag until the closing tag has been loaded. In most browsers, it will work, but IE7 or lower especially (and depending on what else is going on the page, IE8+) will balk if you try to find an element that isn't closed. So, if we do a DOM manipulation, we're basically back to sequential loading.. with extra JS to do it.

So, with that said, again, I don't know of any great solutions for your case. We have a lot of users, and in all honesty, this is the first case we've heard of this exact usages of the -if IEx- tags. Like mentioned before, we usually see that method to load other CSS file (which is also what the default Joomla templates do). I did a google search and did find other examples and recommendations to do what your doing, but it still doesn't seem common from what we've seen.. which makes it hard for us to cater to it (not saying it's wrong). Other things, like capitalized BODY or even wierd cased BoDy tags are things we've fixed before, as well as additional classes or weird things in the body element itself.. but just not sure how to handle multiple tags in IF/Else blocks properly.. especially without knowing which will be used.

It would be possible to add the JS to every opening body tag we see, but that's more code on the page, and possibly could affect some other sites in some unforeseen way.

Whew.. either way, we're obviously thinking about it, so don't think I'm throwing you under the bus. Again though, for the upcoming 4.0 release, I don't think we'll have a fix.. so keep this in mind when you upgrade.

Thanks again for the feedback, and any other suggestions are welcome!
Alex
The topic has been locked.
Active Subscriptions:

None
12 years 9 months ago #11961 by pdxfixit
To clarify -- I don't think you're throwing me under the bus, in any way -- I just wanted to add my thoughts to see if an all-encompassing elegant solution could be had, for the future. All of this is separate from the actual issue, which you resolved in your first post.

Again, thanks.
The topic has been locked.
Support Specialist
12 years 9 months ago #11963 by alzander
No problem. Didn't think you felt that way, but had to say it :)

Glad we did get you figured out though, and hope everything's going well with the project. The site looks really good!
Alex
The topic has been locked.
Active Subscriptions:

None
Hi Alzander, I send the review on JED, can´t be better the component and support!

I´m having the same issue on www.webbra.com.br/agora/ and I think it´s related to the plugins order but I can´t figure out how is the perfect order. Can you help me please?

Thanks a lot!

Best regards!
The topic has been locked.
Support Specialist
12 years 9 months ago #12118 by alzander
Daniel,
Very sorry for the delayed response. I just looked at the code on your page, and the problem you're having is because it looks like there's no App ID set. Can you check your settings in the Facebook API tab of the Configuration area.

When I look at your page, if you search for FB.Init, you'll see AppId: ''. There should be a number in that area (your AppId), and without it, the Login button won't work.

Everything else on your page looks good though, so when that's fixed, hopefully you'll be good to go.

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

None
12 years 8 months ago #12327 by alanstylez
Help! I'm having similar issues (I think) at nuvacord.com

I had this plugin working at first, but then I think I started losing some functionality after upgrading to j1.7

Now the front-end doesn't even reflect the back-end settings (ex. Powered by JFBConnect display is set to OFF).

Problems may be related to having both Kunena and Community Builder installed (CB has a FB login plugin installed, but it shouldn't be displayed without CB Login).

What can I do?
The topic has been locked.
Support Specialist
12 years 8 months ago #12343 by alzander
For the "Powered By" link, that's set in the JFBCLogin module itself, so I'd check that setting.

Looking at the code for your page, it looks like the JFBConnect - System plugin isn't installed. Please make sure that's enabled. Beyond that, if you're having other issues, please let us know what they are so we can help narrow down causes further.

As for the CB Facebook plugin, it shouldn't be used when JFBConnect is installed. They both try to communicate with Facebook in their own way, and that can confuse Facebook and cause unexpected results. There should only be one extension on your site to manage Facebook authentication.

Hope that helps, and good luck,
Alex
The topic has been locked.