× Joomla Facebook Connect support forum

Topic-icon Add the Facebook Connect to the user registration screen?

Active Subscriptions:

None
13 years 9 months ago - 13 years 9 months ago #4277 by fb_17007719
I have an area of my site that requires the user be logged in to access the content. If a person is not logged in it redirects to the com_user login screen. I can modify the content of that file to take out the username and password field etc. I'd like to place the Facebook connect button on this page that will allow the user to login or create an account. Can the fconnect button be added elsewhere to content or does it only work in the jfb module?

Thanks in advance

Chris
File Attachment:
Last edit: 13 years 9 months ago by fb_17007719.
The topic has been locked.
Support Specialist
With JFBConnect 2.x it takes a bit of code to add the FB button to different areas of the page. With JFBConnect 3.0 (being released today if all goes well), we've made multiple improvements to implement this request. It should be about 3 lines of code to add a FB login button anywhere in the site.

We're also planning a plugin which will let you type {fblogin} (or something similar) in an article or anywhere else on the site, and it will be replaced with the login button. That will come after any required quick fixes for the 3.0 release are patched, if necessary.
The topic has been locked.
Active Subscriptions:

None
What happened with this? Is there simple code to add to the registration page?
The topic has been locked.
Support Specialist
Unfortunately, the change too a little more work than we wanted to create a {} in the 3.0 release. This functionality will be in the 3.1 release (due within a week). In the meantime, if you need to add a login button, you can follow the directions in the post below:
www.sourcecoast.com/extensions/jfbconnec...estions#login-button

It requires some PHP code, which isn't the most convenient for everyone, but it works. If you're not sure where to add this to the screen, let us know, and we can help you with that.
The topic has been locked.
Active Subscriptions:

None
I tried adding the code to the registration page and got the following results. If a new user clicks on Facebook button the registration page is refreshed with an authentication error at the top of the page, "Login denied! Your account has either been blocked or you have not activated it yet. Did you not get an activation e-mail and follow the validation link?" This would be very confusing to a new user. If an existing user does this the registration page is refreshed with the registration form filled out with Facebook credentials.

Is there additional code I could add that would take them to the page that asks if they are a new user or if they want to sync with an existing account?
The topic has been locked.
Support Specialist
I agree, that would definitely be confusing.

Just to make sure, if you were to enable the JFBCLogin module, and try to login as a new user, does it work properly? I want to narrow down that it's inserting the login button that's causing the problem, and not a configuration issue.

There's no additional code to do what you're looking for as far as registering or logging in. The main setting you'd need to configure to enable the login/register page is setting the New User Creation setting to "Full Joomla User". If you're using the "Facebook User Only", we'd recommend enabling the "Automatically link users by email" setting. This will make it so if a new user clicks the Login With Facebook button, it will create them a new account. If a returning user clicks it, and already has already registered on your site with the same email address as their Facebook account, it will automatically sync them up.

If none of the above help, feel free to post a link to your registration page. A lot of the time, we can look at the HTML output and diagnose the problem.
The topic has been locked.
Active Subscriptions:

None
I do have the JFBCLogin module enabled and works properly. I also have it set for "Full Joomla User" and "Automatically Link Facebook Users By Email".

I inserted the button code on the Registration page at the beginning of the form if that helps any.
The topic has been locked.
Support Specialist
Yeah, if you can send a link to the page, that'd be the best way for us to determine what's going wrong. From your description, everything sounds like it's setup correctly.

Thanks!
The topic has been locked.
Support Specialist
Good news! JFBConnect 3.1 is now available in the download area. The Upgrade guide has been updated as well as the configuration guide with information on the new settings.
> Upgrade Instructions
> Configuration Guide
> Changelog

To use the Login Button tag, simply insert { JFBCLogin} (no spaces) anywhere on your site, and you should be good to go!
The topic has been locked.