App Services (Usergrid) Javascript SDK
To get the Facebook example working on your development machine, follow these steps:

1. Sign up
Sign up for a Facebook account.

2. Create a new app
Go to https://developers.facebook.com and follow the prompts to authenticate yourself. Then, go to the Facebook App Dashboard, and create a new app.

3. Specify your Facebook integration method
On the app creation page, make sure you specify that you will use "Website with Facebook Login". You should see something like this. You should enter the url where you will host this sample (e.g. http://mywebsite.com/path-to-my-code). If want just to test with our gh-pages repo, located here: http://apigee.github.com/usergrid-javascript-sdk/, then enter http://apigee.github.com/usergrid-javascript-sdk in the field instead.

4. Get your App Id
Once your app is created, you can get the app id by going here: https://developers.facebook.com/apps

5. Download this code (skip this step if you plan to run it on our gh-pages repo)
If you haven't done so already, download the Usergrid Javascript SDK: https://github.com/apigee/usergrid-javascript-sdk and save to a local directory on your hard drive. You will then need to deploy the code to your server.

6. Run the file
Navigate your browser to the location where you uploaded your code, or go to our gh-pages repo ( http://apigee.github.com/usergrid-javascript-sdk/) and choose "Facebook Login Example".

7. Log in!
Enter your API key, and follow the prompts.