Facebook provides tools to quickly register users for your website. With the addition of the Registration, Facebook will facilitate user registration for Facebook and non-Facebook users. Facebook can replace or supplement your user account system with to help drive signups and improve data quality.
Configuring registration on a website for the first time, or supplementing an existing registration requires planning to ensure the optimal user experience. This document will highlight common registration scenarios, and provide best practices to detect the state of returning users.
You might also want to see our page that contains information on the registration plugin or advanced information about the registration plugin.
UID- Facebook user account number, a unique identifier for a user
on-login Callback- When a user logs into Facebook with the Login Button, and the user has already authorized your application, the function specified for
on-loginwill be called. Otherwise the user will be redirected to the specified registration URL.
<fb:login-button registration-url="http://developers.facebook.com/docs/user_registration" on-login="console.log(arguments)" />
Login Status- Use FB.getLoginStatus, a Javacript SDK method that returns the status of the user with the following states:
||user is logged into Facebook, has authorized your app|
||user is logged into Facebook, has not authorized your app|
||user is logged out of Facebook.|
If you do not currently have any existing registered users, or you are starting a brand new website, we recommend this approach for simplicity. The Registration Plugin will streamline the Registration process for Facebook users by pre-filling many fields, and for all non-Facebook users, provide a simple form that can be easily integrated into your website.
Adding Facebook to your own registration/authentication system can add a few complexities. Specifically, if a user registers with Facebook, and you already have an account for that user (detected via identical e-mail address or browser cookie), those accounts should immediately be merged.