Kentico CMS 6.0 Developer's Guide

Available web parts

Available web parts

Previous topic Next topic Mail us feedback on this topic!  

Available web parts

Previous topic Next topic JavaScript is required for the print function Mail us feedback on this topic!  

After configuring the settings, you can use the following two web parts on your website to allow Facebook Connect authentication. The web parts are located under the Membership category in the web part catalog.

 

Facebook Connect logon

 

This web part can be used to let site visitors sign in to your website using their Facebook username and password. It can be placed on any page of your website. The web part is hidden to authorized users and will be displayed only to unauthorized public site visitors. With default settings, the web part appears as in the screenshot below.

 

devguide_clip0994

 

If you click the button, a new pop-up window opens, letting you log on using your Facebook username and password.

 

devguide_clip0991

 

After successful logon, you will be redirected back to the Kentico CMS site where you came from, but you will be authenticated and a new account will be created in case that this is your first logon.

 

Even though the web part works fine with default settings, it has the following specific properties to fine-tune its behavior:

 

Sign in text - if entered, link with the entered text will be used instead of the default sign in image

Size - you can choose from 5 pre-defined sizes of the button

Length - specifies which text label to use on a button with size specified as small, medium, large, or xlarge; specify short for the text label Connect only or long for the text label Connect with Facebook

Use latest version - check this box if you want to use the latest Facebook Connect login buttons; don't check this box if you need to use the original Facebook Connect login buttons

 

Show sign out - if checked, sign out link will be displayed after the user logs in

Sign out text - if entered, link with the entered text will be used instead of the default sign out image

Show as button - if checked, buttons will be used instead of links

Sign out image - if set, the image will be used as sign out link

 

Facebook Connect required data

 

In some cases, you may want new users to provide some extra details before their account is created. For example, if your site is configured to require registration approval or double opt-in, all users need a valid e-mail address to help activate their account.

 

This can be achieved using the Facebook Connect required data web part. The web part must be placed on the page specified by the Required user data page  value in Site Manager -> Settings -> Security & Membership -> Authentication -> Facebook Connect.

 

The following properties of the web part are the most important:

 

Allow forms authentication - if checked, new users will be able to enter a password for their new account so that they can log in the usual way as well as via Facebook Connect

Allow existing user - if enabled, users are allowed to join their existing account with their Facebook user ID

Default target URL - if no return URL is passed, users will be redirected to the URL entered here after merging or creating the account

Hide for no Facebook user ID - if checked, the web part will be hidden if the page with it is displayed without Facebook Connect logon (e.g. when accessed by entering its URL into the browser)

 

Other specific web part properties are explained in Kentico CMS Web Parts Reference or after clicking the Documentation (Documentation) link in the top right corner of the web part properties window.

 

devguide_clip1756

 

The screenshot above shows how the web part looks with both the Allow forms authentication and Allow existing user options enabled. In the left part, an existing site user can merge their current user account with the Facebook user ID by just entering their user name and password used on your site. In this case, the Facebook user ID will be added to the Facebook user ID field of the existing user account. New users can enter the required details in the right part of the web part.