Topic-icon JFBCSystem plugin interfering with custom FB widgets

Active Subscriptions:

None
12 years 3 weeks ago - 12 years 3 weeks ago #44089 by klox7
Hi,

I have custom FB like button and like box on my page and when I have JFBCSystem plugin enabled they don't show. I'm also including javascript SDK in my index.php of template. How can I slove this?

Regards
Last edit: 12 years 3 weeks ago by klox7.
The topic has been locked.
Support Specialist
Is there a reason you don't want to replace those widgets with the JFBConnect versions? In general, that's what we would always recommend for the following reasons:
* Re-including the Facebook Javascript library will slow down your page load time
* Re-including the library also causes conflicts with authentication and other features depending on how you're initializing the library.

Let me know if there's a reason you need to include your own buttons, but it will likely cause you more issues in the long run. At the least, try to remove your inclusion of the Javascript library to minimize issues.

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

None
12 years 3 weeks ago #44124 by klox7
Well, first reason is because I use more buttons like pinterest and tumblr and I want to keep this things together.

Second, I'm dealing with user created content and one option for user is to add his own fb like box. If I leave my custom code with including fb javascript library then this fb like works. If I remove my own javascript inclusion and enable your plugins then fb like box doesn't show up.
The topic has been locked.
Support Specialist
Ahh.. thanks for the explanation.

The likely reason is due to some optimizations that JFBConnect does. In general, we won't tell Facebook to 'parse' the page for it's social widgets unless we know we've put some widgets on the page. It's a performance improvement since it's not requiring unnecessary work. To force the parsing of social widgets, like when you add them yourself, please edit the /components/com_jfbconnect/libraries/provider/facebook.php file. Around line 477, you'll see:
$xfbml = ($this->widgetRendered ? 'true' : 'false');
Add the following right after that:
$xfbml = true;
That will tell JFBConnect to always try to parse tags, whether they are from JFBConnect or not.

In the v6.1 release, due in June, there will be an advanced option to "Always parse social tags" that you'll be able to turn on for just this type of case, instead of having to make a code change.

One thing to note, if you use our social button tags ({JFBCLike} and others), there is extra work we do to try to generate the *best* URL for the current page. That will do things like strip google analytics tags, it understands the URL structure of Joomla, and generally just tries to make sure your Likes are consolidated to one URL instead of multiple URLs to the same content. It's not perfect, but it's (usually) better than just using whatever is in the address bar. That tag can be used anywhere, allowing you to keep your other tags and it all together.

I hope that helps, but if you have any other questions, just let us know.

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

None
12 years 3 weeks ago #44153 by klox7
Thanks, works fine now! Regards
The topic has been locked.
Support Specialist
Glad to hear that worked for you. As mentioned, with the 6.1 release (planned for mid-June), there will be an option for "Always render social widgets" which will be what you need to turn on, instead of making the code change above.

If you have any other feedback, comments or suggestions, always feel free to let us know.

Finally, if you haven't already, please consider leaving a rating and review for JFBConnect, or our support, on the Joomla Extension Directory. It certainly isn't required, but is very appreciated:
extensions.joomla.org/extensions/social-...ook-integration/7215

Thanks,
Alex
The topic has been locked.