How to enable login with a Facebook account?

Step 1.

Login to Facebook and go to
Click «My Apps» → «Add a New App» in the top menu:

Step 2.

Select the rightmost variant «Website» in popup «Add a New App»:

Step 3.

Specify the app’s name:

Step 4.

The «Create New Facebook App ID» will be shown. Click it:

Step 5.

A new window «Create a New App ID» will be opened.
Click «Choose a Category» drop-down and select «App for Pages» item:

Step 6.

Click «Create App ID» button:

Step 7.

Click «App Configuration» on new screen:

Step 8.

Page will automatically scroll down to the form «Tell us about your website».
Fill «Site URL» and «Mobile Site URL» fields and press «Next»:

Step 9.

Your app will be created. Select it from the top menu «My Apps»:

Step 10.

App page will be opened.
Select «Settings» menu item from left sidebar:

Step 11.

Settings «Basic» tab will be opened.
Fill the following fields:

  • «App Domains»: your Discourse forum domain
  • «Contact Email»: your email.

Then press «Save Changes» button:

Step 12.

Go to «Advanced» tab:

Step 13.

«Advanced» tab contains a lot of information.
You need setup «OAuth Settings» section:

«Client OAuth Login» switcher must by in «Yes» state (this is by default).
«Valid OAuth redirect URIs» field must be filled with url like:

http://<your forum domain>/auth/facebook/callback

For example:

Step 14.

Click «Save Changes» button in the page’s right bottom corner:

Step 15.

Return to the «Basic» tab and click «Show» button near to «App Secret» field:

Step 16.

Copy «App ID» and «App Secret» to some text file. It will be used for Discourse admin setup.

Step 17.

Go to «Status & Review» screen using left sidebar and click on «No» switcher near the text

Do you want to make this app and all its live features available to the general public?

Step 18.

A dialog box «Make App Public?» will be shown:

Are you sure you want to make your app public? It will become available to everyone.

Click «Confirm» button:

Now you can see a green indicator right from the app title, and switcher must be in «YES» state:

Step 19.

Go to «Settings» → «Login» section in your Discourse admin panel:

Step 20.

Check «enable facebook logins» option on.
Fill «facebook app id» and «facebook app secret» with data from Step 16 above:

Step 21.

Check that Facebook login opiton is now available and test it:

1 Like

A post was split to a new topic: Facebook App: «Can’t Load URL: The domain of this URL isn’t included in the app’s domains»