-
Notifications
You must be signed in to change notification settings - Fork 142
Setup Facebook App
You need a verified Facebook account.
- Login to https://developers.facebook.com/
- Click on My Apps -> Add a New App -> For Everything Else
- Fill in Display Name with your app's name (eg:
My Icare
) and click on Create App ID - Click on Settings on the left sidebar
- Set a Namespace (eg:
myicare
) - Fill in App Domains with your application's domain (eg:
myicare.herokuapp.com
) - Click on Add Platform
- Click on Website
- Fill in Site URL with your application's URL (eg:
https://myicare.herokuapp.com
) and press Save changes - Click on Save Changes, we are done!
When you attempt logging into your app for the first time, you will get an error:
Can't Load URL: The domain of this URL isn't included in the app's domains. To be able to load this URL, add all domains and subdomains of your app to the App Domains field in your app settings.
This will automatically add Facebook Login as a product in your Facebook developer console.
You will need to add the following Valid OAuth Redirect URIs under Products > Facebook Login > Settings:
https://<app name>.herokuapp.com/users/auth/facebook/callback | https://<app name>.herokuapp.com/
For example:
https://myicare.herokuapp.com/users/auth/facebook/callback | https://myicare.herokuapp.com/
We suggest you to create a separate application for the development environment.
Fill in App Domains with lvh.me
and Site URL with http://lvh.me:3000/
. If you are not able to connect to http://lvh.me:3000/
, try to start your application via rails s -b 0.0.0.0
.
Note that lvh.me is a free online service that redirects all requests (including subdomains) to localhost