Facebook Developers
DocumentationSupportBlogAppsLog In
  • Getting Started
  • Core Concepts
    • Social Design
    • Social Plugins
    • Open Graph
    • Social Channels
    • Authentication
    • Graph API
  • Advanced Topics
  • SDK Reference
  • Tools
  • Plugins
    • Registration
    • Registration Advanced Uses
    • User Registration Flows
  • Beta Plugins

    User Registration Flows

    Core Concepts › Social Plugins › User Registration Flows

    Introduction

    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.


    Terms and Common Tasks

    • 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-login will 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:
    response.status Description
    connected user is logged into Facebook, has authorized your app
    notConnected user is logged into Facebook, has not authorized your app
    unknown user is logged out of Facebook.

    Scenarios

    My site only uses Facebook for Registration

    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.

    Facebook Only Registration Diagram

    My site uses Facebook and my own Registration

    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.

    Mixed Registration Diagram

    Updated over a year ago
    Facebook © 2012 · English (US)
    AboutCareersPlatform PoliciesPrivacy Policy