× Joomla Facebook Connect support forum

Topic-icon Login With Facebook doesn't work out of the box

Support Specialist
14 years 7 months ago #15028 by alzander
Zac,
This is my job, and I love it. Developing Joomla extensions is fun, but we like helping out users as well, so no worries about the support requests. Besides, your subscription is there just for that reason. Facebook integration (heck, Joomla in general), can be confusing. That's what we're here to straighten out!

The logging out issue is what I mention above ( here ). Since you have "automatically log Facebook Users In", and you aren't using our Logout button (which logs the user out of Facebook as well), JFBConnect is automatically logging them back in.

To fix, you'll need to either disable the Automatically Login Facebook Users setting or add the Javascript code in the post above to Kunena's logout button so that user's are properly logged out of their Facebook account when they log out of your site.

As for the Login and forgot links, you may simply be able to get rid of those by going into the Global Configuration area of Joomla and disabling "Allow User Registrations". If that doesn't work, then you may have to modify Kunena's template file for that login area. The file is usually /components/com_kunena/template/default/loginbox/login.php , but I'm assuming you've already modified that little to get our Login with FB button there.

Hope that all helps, but if you need more assistance, just let us know. As for a review on the Joomla Extension Directory, we'd definitely appreciate it, but we'll help you either way :D

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

None
14 years 7 months ago #15052 by zacpen
Ok I was able to remove the login/register buttons like I wanted, and added the Login by Facebook button in it's place by using {JFBCLogin}

Now how do I go about adding a Logout button so that people can logout of both the website and facebook. I tried adding this code under the login code but it didn't work...
<input type="submit" name="Submit" id="jfbcLogoutButton" class="button" value="Logout" onclick="javascript:jfbc.login.logout_button_click()" />

Is there an easy script I can use like the login button?
The topic has been locked.
Support Specialist
14 years 7 months ago #15059 by alzander
{JFBCLogin logout=true} will show the Logout button when the user is logged in. If the logout=true setting is missing (or false), then the login button just hides itself when a user is logged in.

With that said, you're code above actually looks right, so it's possible you may still run into issues.. if you do, let me know, and I can test on the page and let you know what's wrong.

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

None
14 years 7 months ago #15074 by zacpen
Yeah it still doesn't show the logout box. I am going to include line 30-40 of my login.php file for you to review...

<div class="k_guest">
<?php echo JText::_('COM_KUNENA_PROFILEBOX_WELCOME'); ?>,
<b><?php echo JText::_('COM_KUNENA_PROFILEBOX_GUEST'); ?></b>
{JFBCLogin logout=true}
<input type="submit" name="Submit" id="jfbcLogoutButton" class="button" value="Logout" onclick="javascript:jfbc.login.logout_button_click()" />
</div>
<?php if ($login) : ?>
<form action="<?php echo KunenaRoute::_(KUNENA_LIVEURLREL) ?>" method="post" name="login">
<div class="input">
<span>
<?php echo JText::_('COM_KUNENA_A_USERNAME'); ?>
The topic has been locked.
Support Specialist
14 years 7 months ago #15077 by alzander
Zac,
From the code you sent, it looks like that section is only for guests only. My guess is that Kunena shows that block for guests, and another, separate, block (or file) for logged in users. Because of that, the Logout button code is simply never being executed.

Either of the methods for the logout button you show should work.. I think you're simply placing the code in a block of code that isn't being run for logged in users.

Hope that helps narrow things down, but if not, let us know!
Alex
The topic has been locked.