The potential for really powerful mobile applications is huge when Cognito is used to combine the power of AWS with your PhoneGap/Cordova application. It is also a great low cost alternative to Parse.com when used for storing user information.
Register a Facebook App
This process is different to that used with NodeJS because the app will be running from the device local domain.
Go to developers.facebook.com and select Apps - Create a New App
Record your App ID and App Secret somewhere safe, we will need it later.
Click on Settings then click on Advanced (do not fill in app domain details or add platform).
Select Native or Desktop app.
Add https://www.facebook.com/connect/login_success.html as the Valid OAuth redirect URI.
Next select Status and Review
Toggle Yes for Do you want to make this app and all its live features available to the general public?
Now that we have registered our new app with Facebook, we will tell Cognito all about it next.
Create a Cognito Pool
Now that we have a Facebook App registered we need to create a Cognito pool that will be linked to the Facebook app.
Go to the Cognito start page and click Get Started Now
Give your app a name in Identity Pool Name.
Paste your Facebook App ID.
Leave Enable Access to Unauthenticated Identities unchecked.
Click Create Pool
An IAM role has been automatically created for you. Click Update Roles
Finished! You have created a Cognito pool and are viewing its dashboard. Next, in part 2 we will use OpenFB to sign in and get our Facebook session token.