× Joomla Facebook Connect support forum

Topic-icon Not able to Login using Facebook only

Active Subscriptions:

None
15 years 8 months ago #5180 by fb_611068697
Hi, I'm setup with community builder integration, and I'm not able to allow users to "Login with Facebook" to 'creat a facebook user only' even though I think I have set up properly to allow this.
Settings:
User Creation: Facebook User only
Community Builder Integration page: All 'Yes'
Joomla 'Allow User Registration': I've tried 'yes' and 'no' (I run it with 'no' and let CB handle registration, but have tried 'Yes' here as well.

I can use the login module to login to the site, but if I try to login only using Facebook to create a facebook user only, the page will reload, but no login or user creation will occur.

I have tried 'Disable SSL Certificate Validation'. I get no error messages.

Here is link to dev site where this is happening. thanks

bit.ly/8Xsdq9
The topic has been locked.
Support Specialist
15 years 8 months ago #5183 by alzander
That's definitely strange.

I see the issue. When I try to login, I just see the page reload and it looks like I can log in again. I'm not sure which SEF component you're using, but can you try disabling it temporarily to see if that resolves the issue?

Other than that, I think I might need access to the site to debug. There's no obvious javascript errors (which can be problematic) or other obvious things I can see that could be the cause. Sorry for the vague answer, but we'll get you going!
The topic has been locked.
Active Subscriptions:

None
15 years 8 months ago #5280 by fb_611068697
Alex, thanks for your reply. I'm not sure why it started working, but I am now able to login using Facebook connect. I'm using sh404sef and disabled that, but it didn't seem to have any impact. But, now seems to be working for login.

My new problem seems to be that I can't logout. I'm using the CB login module, and when I choose to logout it just refreshes the page and I'm still logged in after.

I have autologin facebook users set to Yes, and Log Out of Joomla only set to No. Is this because I'm using the CB login/logout module?

Website (different than above) is traveldealstohawaii.net

thanks
Jeff
The topic has been locked.
Support Specialist
15 years 8 months ago #5281 by alzander
Very strange, still. Let us know if it breaks again.

As for the non-logout issue, you hit the nail on the head. The "Logout of Joomla Only" setting only has an effect on our JFBCLogin 'logout' button, for now. So, if you're using a separate logout module, it will only log you out of Joomla. In that case, if you have "Autologin Facebook Users" set to yes, when you log out of Joomla (only), on page reload, the user will still be logged into Facebook and will be automatically logged back in.

We have some methods in future releases to improve this to work with alternative login/logout modules, for now, the only suggestion is to turn off Autologin if you aren't planning on using JFBCLogin.

Hope this helps clarify the issue, and certainly let us know if you run into any other issues.
The topic has been locked.
Active Subscriptions:

None
15 years 8 months ago #5282 by fb_611068697
Alex, wanted to report that if I use the JFBConnect login module to 'logout', then I am able to successfully logout of my site. However if I use the Community Builder module to logout, for some reason it won't let me logout and keeps me logged in.

It would be fine to just use the JFBConnect module, but if I do this I have a problem because I want to have a version of the module displayed on my page that doesn't show the 'logout' button (I removed this from the default.php), but I would also separately like another instance that does have the 'logout' button -- is there a way to have two separate uses of the module on the same page use different default.php files? Jeff
The topic has been locked.
Support Specialist
15 years 8 months ago #5291 by alzander
There's a few solutions to the problem. Hopefully one of these will work for you:
1) You can add the blue Facebook login button into your CB module. To add the button, you'll need to add a little bit of code to the module, as explained:
www.sourcecoast.com/extensions/jfbconnec...estions#login-button
If you do this, since the CB module's logout button will not log a user out of Facebook, you should not enable the "Autologin Facebook Users" option.

2) You can use both the JFBClogin module and CBLogin in different positions. Edit one module to hide the logout button and the other should work as normal. (You may want to add the Login With Facebook button to the CB module as mentioned above)

3) There's no 'built-in' way in Joomla to use multiple default.php files depending on the instance. However, you can do this pretty easily on your own. Simply copy the mod_jfbclogin directory to mod_jfbclogin_special. Then, edit the mod_jfbclogin.xml file and update the name to "JFBCLogin Special". You can modify this special module's default.php however you want, and when you're in the module manager, you can add it just like a separate module.

Hope one of these solutions help. If you have questions or problems, just let us know!
The topic has been locked.
Active Subscriptions:

None
15 years 8 months ago #5298 by fb_611068697
Thanks Alex! I've used option 3, and it almost works.

I created the separate module directory, changed in name in the xml, and added the new module on my page. However, there seems to maybe be some overlap--maybe something else I need to change to make the two modules co-exist on same page?

What's happening is that, the new 'special' module I've added doesn't show the logout button (even though the default.php file in the new module directory is the unmodified version and should). I'm thinking that maybe somwhere it is picking up by name or by directory reference the information from the other module--it seems to be displaying what the default.php shows from the main install of the module and not from the version I modified. Thanks again
Jeff
The topic has been locked.
Support Specialist
15 years 8 months ago #5299 by alzander
You couldn't have narrowed it down better.

At the bottom of the /mod_jfbclogin_special/mod_jfbclogin.php file, you'll find the following line:
require(JModuleHelper::getLayoutPath('mod_jfbclogin'));

Update that to be mod_jfbclogin_special (or whatever you called it). Good luck, and keep us posted!
The topic has been locked.
Active Subscriptions:

None
15 years 8 months ago #5300 by fb_611068697
Alex, thanks again but still for some reason not picking up new default.php. I even renamed the default.php, and in the xml file of the 'special' module, changed the filename for the default.php.

Is there possibly an easy way I could past the logout button from jfbconnect into the CB module? Some variation of this (this is of course the logout text from the default.php file)?

<input type="submit" name="Submit" class="button" value="<?php echo JText::_('Logout') ?>" onclick="javascript:fb_logout_button_click()" />
The topic has been locked.
Support Specialist
15 years 8 months ago #5301 by alzander
Actually, you can add that exact statement to your CB Logout module. The important part is really the onclick="..." tag, which you should just be able to add to the existing logout input in that module. That fires the javascript which will log the user out of Facebook if selected and redirect the user. It will override the logout redirection of the CB module, if you have that set, and use the JFBConnect logout settings.

One final thing, you'll need to ensure that the JFBConnect javascript is inserted on the page. You can do this by adding the following PHP to the module:
require_once(JPATH_ROOT.DS.'components'.DS.'com_jfbconnect'.DS.'libraries'.DS.'facebook.php');
JFBConnectFacebookLibrary::getInstance();

Keep us posted.
The topic has been locked.