l version="1.0" encoding="utf-8"?> Facebook Login

Open topic with navigation

Ektron CMS400.Net Reference


Facebook Login

The Facebook Login is an alternative lớn Ektron CMS400.NET"s standard login. Its advantage is that users can log in using their Facebook username and password, instead of having to lớn set up and remember a separate Ektron CMS400.NET username and password.

Bạn đang xem: Facebook com đăng nhập

Here is an example of Facebook Login control on a web page.

*

The Facebook Login control allows both Membership users and Ektron CMS400.NET users log in khổng lồ an Ektron CMS400.NET website site. If users already have an Ektron CMS400.NET user profile, they can be prompted to liên kết the Facebook username and password with that profile.

The Facebook Login only provides an ability khổng lồ log in lớn an Ektron CMS400.NET site. It provides no other Facebook features, such as viewing or sending messages.

gmail login facebook sign up

This section explains how to lớn set up và use the Facebook Login feature through these topics. Facebook

Samples of the Facebook Login Feature

Using Facebook Login with Active Directory

User Experience

Developer Experience: Setup Instructions

Using Facebook Connect Extension with the Targeted nội dung Widget

Samples of the Facebook Login Feature

You can see samples of the Facebook Login feature in these sites.

Developer Sample site > Social Networking > Facebook Connect

- site root/developer/FacebookConnect/Login.aspx

- site root/developer/FacebookConnect/CustomSignup.aspx

Ektron Tech site has Facebook Login on the trang chủ page

*

Using Facebook Login with Active Directory

You cannot use the Facebook Login feature with Active Directory.

User Experience

Note: ">Note: The user experience is only enabled after a developer sets up the feature. See Also: Developer Experience: Setup Instructions

If a user clicks a Facebook Login button but is not logged into Facebook, the page below appears

When the user completes this screen or if the user is already logged into Facebook, he is forwarded to lớn a page (see example below) that prompts him to lớn register or log in to lớn Ektron CMS400.NET.

This screen asks the user if he has a membership account and, if so, would he lượt thích to connect his Facebook username và password with the Ektron CMS400.NET account. If the user agrees, he will access his membership account via the Facebook Login control with Facebook credentials from now on.

If the user does not have a membership account, he completes the lower half of the screen. This is the same screen that new members use lớn create accounts. See Also: Membership vps Control

From then on, the user can click the Facebook Login button lớn log into Ektron CMS400.NET using his Facebook username & password.

When the user logs out of Ektron CMS400.NET, that kích hoạt does not log him out if Facebook. Conversely, if a user logs out of Facebook, he is not logged out of Ektron CMS400.NET.

Note: ">Note: Facebook often caches some information in your browser. If you see JavaScript errors or other odd behavior, clear the browser cache, close all browser windows, và try again.

Developer Experience: Setup Instructions

To set up the Facebook Login feature, follow these steps.

Step 1: Connect Facebook to lớn Your Ektron CMS400.NET web Site

Step 2: Create or Modify a Facebook Login/Signup Page

Alternative khổng lồ Redirecting lớn the Signup size

Step 1: Connect Facebook to lớn Your Ektron CMS400.NET website Site

Follow these steps khổng lồ obtain Facebook keys, paste them into the web.config file, và identify your site to lớn Facebook.

1. In you don"t have one, create a Facebook account. Go khổng lồ www.facebook.com & follow the sign up instructions.

2. Sign in lớn the Facebook Developer site, http://www.facebook.com/developer.

3. Click +Set up New Application.

4. Enter a name for your application. The name cannot include facebook or any variations, such as FB.

5. A new screen appears, showing your Application ID, API key, & Secret key.

*

6. Mở cửa your website site"s root folder/web.config file.

7. Copy the corresponding Facebook keys into these web.config elements

ek_FacebookApiKey

ek_FacebookSecret

Note: ">Note: Keys shipped in Ektron sample sites are for localhost.

Note: ">Note: Make sure the Facebook keys were generated for the host header/URL to lớn which you"re applying them. Also, if you are testing using secure site setup, verify that the web.config element ek_useSSL is true.

8. Save & close web.config.

9. Return khổng lồ the Facebook Basic screen.

Xem thêm: Top 19 Phim Thái Trò Chơi Tình Ái Tập 25 Vietsub, Trò Chơi Tình Ái Tập 25

10. Click the Connect tab from the left panel.

11. Into the Connect URL field, enter the URL of your web site.

*

for a public site, enter its URL. For example, www.ektron.com.

for a shared hệ thống or if you are accessing the site from a remote machine, use the IP address. As examples, http://192.168.14.10, http:// 192.168.14.10/QA

for a local server, use localhost. As examples, http://localhost, http://localhost/EktronTech

12. Save and close the Facebook screen.

After setting up your application, you can return khổng lồ this screen at any time to lớn view the keys, edit the Connect URL setting, etc.

Step 2: Create or Modify a Facebook Login/Signup Page

Facebook provides a sample khung (shown below) that appears if a user clicks a Facebook Login button và is not currently logged into Facebook.

The above khung is created by Facebook, not Ektron CMS400.NET.  You can customize parts of it, such as the title and site image) using Facebook"s Application settings.

When the user completes the form, he is forwarded to an Ektron CMS400.NET khung (see example below) that prompts him khổng lồ register or login lớn Ektron CMS400.NET.

You specify which size appears via the Facebook Login vps control"s SignupTemplate property. The default form in the Developer sample site, site root/Developer/FacebookConnect/register.aspx, is shown above. You can use the default form as is, modify it, or create your own.

The ngắn gọn xúc tích to connect a Facebook user with an Ektron CMS400.NET trương mục (circled below) is not part of the Facebook Login server control. However, sample code for that functionality is included in the Ektron Tech sample site"s register.aspx page.

*

Alternative to lớn Redirecting lớn the Signup Form

If you vì not want khổng lồ redirect the user lớn a signup form after the Facebook login, you can instead hook the Ektron_FacebookNewMemberLoggedIn javascript sự kiện and vị whatever you want with it. For example, you could raise a modal dialog with a short signup form.

You can see an example of hooking this javascript sự kiện in the Developer site under Social Networking > Facebook Connect > Custom signup (site root/developer/facebookconnect/customsignup.aspx).

Step 3: Place the Facebook Login hệ thống Control on a Page

1. In Visual Studio, open the template onto which you want khổng lồ place a Facebook Login server control. See Also: Working with Ektron CMS400.NET hệ thống Controls

2. Drag và drop the control.

3. Use the following table khổng lồ complete its properties.

Note: ">Note: The following table only lists Ektron-specific properties. It does not describe native .NET properties such as font, height, width và border style. For documentation of these properties, see Visual Studio help.

Property

Description

Data Type

Authenticated

Indicates if you are logged in lớn the CMS

Explorer và can use it to lớn browse khổng lồ Content, Collections, etc. See Also: â�,�Using CMS Explorer lớn Browse Your Ektron CMS400.NET Siteâ�,� on page 21-12

String

FacebookButtonText Enter the text that appears on the Facebook Login button. The mặc định text is Connect with Facebook.

String

Hide

Used lớn hide đầu ra of the control in design time và run time.

True = Hide control

False = Display control

Boolean

InstructionDetail

Enter additional text that appears above the Facebook Login button. The default text is Sign in using your Facebook account.

String

InstructionHeader Enter the text that appears above the Facebook Login button. The default text is Sign in using your Facebook account.

String

Language

Set a language for viewing the Facebook Login control. This property shows results in design-time (in Visual Studio) & at run-time (in a browser).

Integer

SignupTemplate Enter the path to lớn the template that appears after a user completes the Connect with Facebook screen. Step 2: Create or Modify a Facebook Login/Signup Page

String

You can customize the markup for the form using the LoginTemplate and LogoutTemplate vps controls. You can find examples of this on the developer site at siteroot/developer/facebookconnect/login.aspx

Note: ">Note: After you update web.config with the Facebook keys, wait a few minutes before logging into Ektron site via the Facebook Login hệ thống control.

Using Facebook Connect Extension with the Targeted nội dung Widget

By using Facebook Login, you can retrieve profile information from the user"s facebook trương mục using Facebook Connect Extension.

This is information available in Facebook profiles.

Age Gender Marital Status Likes Employment

For more information about code to vị this, see the Knowledge Base article entitled "INFO:Targeted nội dung Widget: Facebook Connect Extension" located at http://dev.ektron.com/kb_article.aspx?id=32156.

To learn more about the Targeted nội dung Widget, see Creating a Targeted content Widget.