× Joomla Facebook Connect support forum

Topic-icon Logout script does not work with Facebook badges

Active Subscriptions:

None
15 years 2 months ago #8721 by acarvox
Hi,

As you have previously suggested, I am using "onclick="javascript:jfbc.login.logout_button_click()" to logout with my custom logout button.
This works fine on pages where there is no facebook badge. However, when there is a facebook badge (my company's live stream badge) the logout script does not work. Probably there is some type of a conflict. Can you suggest a solution for this?

Thank you in advance,

Acar
The topic has been locked.
Support Specialist
15 years 2 months ago #8724 by alzander
I'm sure I can suggest a solution, but I'd need to see the page. Can you link to your site, as well as a specific page where you're seeing this issue? We should be able to help you diagnose if it's a Javascript conflict or something else we can help you correct.

Thanks!
The topic has been locked.
Active Subscriptions:

None
15 years 2 months ago #8728 by acarvox
Hi Alex,

One of the pages where the logout button (top right corner) does not work is www.influenster.com/component/option,com...,1/view,influenster/
. For example, it works on www.influenster.com/influenster-badges

thanks
The topic has been locked.
Support Specialist
15 years 2 months ago #8740 by alzander
Acarvox,
I'm trying to register on the site, and when I do, I get a "Username or Password do not match" error. Can you check the JFBConnect Overview page and make sure there are no errors displayed? Look in the Application area in the top and the Required Extension check areas, and correct any notes that may be there.

As for the logging out problem, can you let me know what SEF extension your using on your site? If you know how, please go into it's configuration and disable it from function on JFBConnect links. This usually solves any issues like you describe above, and none of our links need to be SEF'd anyways.

Thanks, and good luck!
The topic has been locked.
Active Subscriptions:

None
15 years 2 months ago #8744 by acarvox
hi
I checked the applications, no errors (only JFBLogin not published). We use sh404sef and I set it such that it skips jfbconnect. This did not solve the problem.
I still cannot logout when I am on a page where there is Facebook Badge.
The topic has been locked.
Support Specialist
15 years 2 months ago #8759 by alzander
Arcavox,
Sorry for the delay. I successfully registered this time. Not sure what was up yesterday, but hopefully it's all good now.

I can see the issue you mention, and it's definitely strange. To Logout, we call a little bit of Javascript code. If there are Javascript errors on your page though, it can prevent some of the Facebook logic from loading, which then prevents us from logging the user out. On that specific page, I'm seeing the following errors (using the Chrome Developer Tools):
user_timeline.json: Resource interpreted as Script but transferred with MIME type application/json.

I don't know what that user_timeline.json file is, but I think it's the cause of the issue. Are you familiar with this, or have any knowledge of it?

Hopefully, this helps you narrow down the cause, but if not, let us know and we'll do what we can to help!
The topic has been locked.
Active Subscriptions:

None
15 years 1 month ago #8925 by acarvox
Hi Alex,
I am not familiar with the user_timeline.json function. One thing I have noticed is, this happens only on pages where we have Facebook Badge (standard badge, coppied and pasted from Facebook developer site). This issue is very important for us. Can you suggest a way we can do this (logout button/link) differently?

Thanks.
The topic has been locked.
Support Specialist
15 years 1 month ago #8934 by alzander
Ahh.. Great sleuthing Arcavox. There's 2 simple options that should hopefully fix your issue:
1) In the Facebook Badge that you've implemented, simply remove the script call that loads the Facebook Javascript library (connect.facebook.net/en_US/all.js#xfbml=1). We're already including the library file, and we're using the en_GB version, because that's what you're Joomla site's language is configured as. Loading it twice, from different servers not only delays loading of the page, but also can cause the conflict you mention above.
2) Use our JFBCFan module instead of your implementation.

Either should work, and hopefully will get you on your way. Good luck!
The topic has been locked.