Integrating with Facebook
To create a game that uses Facebook for authentication, you need to create a Facebook application to generate an Application ID and App secret.
Generating the Facebook Application
To create the application, make sure you are logged in to Facebook, and then go to https://developers.facebook.com. Click the Apps button on the top of the page, and then the + Create New App button. Enter the name Blob Clicker as the name of the Application, as shown in Figure 20-1, leaving the app namespace blank.
If you haven’t yet verified your account, you’ll need to go through a security check as well.
Next, you are presented with your App ID, App Secret, and a screen of options to configure the Application. To start, the Application runs off of localhost for testing purposes. To set this up, fill in the domain name localhost in the App Domains field. Next, further down the page, click the section Website with Facebook Login, and type the URL http://localhost:3000/ (don’t forget the final forward slash “/”) into the Site URL field. Figure 20-2 shows how this screen should look.
At the bottom of the page, click the Save Changes button. Don’t share your App Secret with anyone else. (The secret in Figure ...