Topic-icon Issue JFBConnect and K2 Social

Active Subscriptions:

None
12 years 1 month ago - 12 years 1 month ago #43827 by andsta
Hi,
i've a problem with jfbconnect and like button (insert into k2 template) and like box (module SCSocialWidget). If i disable SCSocialWidget, like button in article doesn't run.
Then, if i've logged into site, i'm able to see like button. If i surf into the site as guest, like button doesn't show (with no reason).
Then, while surfing on the site, occasionally, it open a popup "You Already logged in with Facebook"
JFBConnect Remote Error Check doesn't report any error.

My Joomla version is 2.5.20 and my K2 version is 2.6.7. JFBConnect is 6.0.5
Last edit: 12 years 1 month ago by andsta.
The topic has been locked.
Support Specialist
12 years 1 month ago #43829 by alzander
The problem with the button not showing is due to a conflict between the JFBConnect and K2 social items. JFBConnect is initializing the Facebook Javascript library in a specific manner and for the features JFBConnect is setup to use on that page. K2 is initializing it differently. Loading the library twice will also cause page slowdowns and *could* cause other issues with authentication and other features of JFBConnect.

What we'd recommend is either:
* Enabling the JFBConnect social buttons in the JFBConnect -> Social area to automatically display in your K2 content and disabling the K2 ones.
* Or, editing the K2 template and replacing the Facebook button that they're inserting with the JFBConnect Like button tag, {JFBCLike}. That will add the Like button and do it in a compatible way.

The other option is a modification to JFBConnect, which could clear up this conflict. Other conflicts may remain though. If you want to try it, please edit the /components/com_jfbconnect/libraries/provider/facebook.php file. Around line 478, you'll see:
$xfbml = ($this->widgetRendered ? 'true' : 'false');
Change that to:
$xfbml = 'true';

That should tell our initialization of the Facebook library to try to parse out the Like button as well, and should get you going. However, that's the least recommended as you'll need to make that modification with each update of JFBConnect and, again, may not fix all conflicts.

Let me know how that goes, and good luck!

Alex
The topic has been locked.