Facebook Connect 4.x

Legacy documentation for Facebook Connect 4.x.

Behind the Scenes

One of the main goals of Facebook Connect (FBC) is to allow your site visitors to log into your site as an EE member using their Facebook account. The advantage is that visitors to your site do not need to keep track yet another username and password - their Facebook account is all they need to know to log into your website.

Passive Registration (new users with no EE account)

Your site's registration can be automated using FBC's passive registration feature. New users automatically receive an EE member account and are automatically logged into your site. Behind the scenes, these are the chain of events that occur for a new user when passive registration is enabled:

  1. A new user (ex: no EE member account) visits your website and clicks the FBC Login button.
    • If the user is not logged into Facebook, a popup window will appear asking them to first login to Facebook.
  2. A popup appears to ask the user to register your website as one of their apps in their Facebook account.
  3. The user allows the permissions mentioned in the popup and clicks Allow.
    • For permissions, if email is allowed as a permission, for example, FBC will add the user's real Facebook email address in the EE member account's email field. This process is similar for the other permissions.
    • Permissions are based on the allowed permissions set by the permissions parameter in the Login tag.
  4. (Background) FBC will create an EE account, based on one of the two following cases:
    • FBC will create an EE member account from the users basic Facebook data, and then link the EE member account to the users Facebook account.
  5. The user is now logged into both Facebook and your EE site, using only their Facebook account. This is also known as being FBC logged in.

Non-Passive Registration (new users with no EE account)

You may also choose to allow registration on your website with a user's Facebook account through a more active registration approach. This option assumes you're using a member registration add-on such as Solspace User addon or similar. Behind the scenes, these are the chain of events that can occur for a new user when passive registration is disabled:

  1. A new user (ex: no EE member account) visits your website and clicks the FBC Login button.
    • If the user is not logged into Facebook, a popup window will appear asking them to first login to Facebook.
  2. The user is sent to a page with a Register form based on FBC:Login's return_to_register parameter.
  3. The user fills out your Registration form (with Solspace User addon or similar) and successfully submits form.
  4. (Background) EE will create an EE member account as usual.
  5. User will need to be presented with FBC Login button again to sync newly created EE account with Facebook.
  6. Continue to Users with a Previous EE Member Account documentation for next steps.

Returning Users (after creating an EE account through FBC)

If the user revisits your site again later, they will be automatically logged in to your site as long as their browser remembers them. If not, they will only need to click on the FBC Login button to log into your website as an EE member. Here are the chain of events in that case:

  1. A user visits your website and clicks the FBC Login button.
    • If the user is not logged into Facebook, a popup window will appear asking them to first login to Facebook.
  2. (Background) FBC compares the user's Facebook account information with the linked EE member account.
  3. (Background) FBC logs the user in to your website as an EE user.
  4. The user is now logged into both Facebook and EE. This is also known as being FBC logged in.

Users with a Previous EE Member Account

Users that have an EE member account created before FBC was installed, or created an EE member account using the native EE or Solspace User addon (or similar) registration form, will first need to log into EE before linking their account to their Facebook account. If a user with a previous EE member account does not log into EE, FBC will create a new EE member account when using the FBC Login button if Passive Registration is ON, effectively creating two accounts for this user (undesirable of course).

Here are the chain of events for users with a previous EE member account / already logged into EE but not yet synced to Facebook:

  1. A user first logs into EE using a standard login form or similar.
  2. The user then clicks the FBC Login button.
    • If the user is not logged into Facebook, a popup window will appear asking them to first login to Facebook.
  3. A popup appears to ask the user to register your website as one of their apps in their Facebook account.
  4. The user allows the permissions mentioned in the popup and clicks Allow.
    • For permissions, if email is allowed as a permission, for example, FBC will add the user's real Facebook email address in the EE member account's email field. This process is similar for the other permissions.
    • Permissions are based on the allowed permissions set by the permissions parameter in the Login tag.
  5. (Background) FBC will create an EE account, based on one of the two following cases:
    • If the Confirm Before Syncing Accounts? preference is set to NO (most common setting):
      • FBC will create an EE member account from the users basic Facebook data, and then link the EE member account to the users Facebook account.
    • If the Confirm Before Syncing Accounts? preference is set to YES:
      • An EE member account will be created and linked with the user’s Facebook account only after they complete the FBC Account Sync Form.
      • Access to the FBC Account Sync Form can be done using the return_to_confirm_account_sync parameter in Login tag.
      • Once the FBC Account Sync Form is completed and submitted, FBC will create an EE member account from the users basic Facebook data, and then link the EE member account to the users Facebook account.
  6. The user is now logged into both Facebook and your EE site, using only their Facebook account. This is also known as being FBC logged in.