Login with the credentials of the account you want to connect to Discourse and follow the wizard.
If you already have other apps instead of Get Started you will see the entry My Apps, then just click on Add new app and follow the guide from step 1b
1a. Select Developer

1b. Provide a name for the app, for example `Discourse Login` and click on <kbd>Next</kbd>.

1c. Click on <kbd>Add your first product</kbd>

Setup the Valid OAuth redirect URI field, entering https://discourse.example.com/auth/facebook/callback – obviously, replacing the domain with your site’s actual domain name and matching the HTTPS protocol. Remember that the HTTPS protocol is now mandatory for all URI redirects. Click Save Changes.
Once completed, a successful setup should look like this in Products/Facebook Login/Settings:
Navigate to Settings/Basic, enter your Discourse URL (https://discourse.example.com) in the App Domains field and also enter the URL for your Discourse site privacy policy and Terms of Service in the appropriate fields and also upload the icon of your site. (Mind that for your privacy and tos link to be verified, you should have a valid SSL certificate integrates, which is not self-signed. If the certificate is missing, or self-signed, you won’t be able to save your changes).
If you have a company that does business in the European Union, you may want to fill in the Data Protection Officer Contact Information form before clicking on Save Changes.
⚠️ Facebook has changed this step to ask for extra information. We are currently working to determine what you need to provide; see recent replies. (November 2020)
There is now a field for User Data Deletion information for GDPR compliance. Select “Data Deletion Instructions URL” from the dropdown and add a link to a page (such as https://discourse.example.com/tos#deletion) which contains a sentence like “Accounts on this site can be anonymized or deleted at the user’s request. Contact our @support group for details.”
At the bottom of the page click on Add Platform and select Website
In Discourse site settings, enter your Facebook app’s App ID and App Secret in the facebook app id and facebook app secret fields. You’ll also want to check off Enable Facebook authentication, requires facebook_app_id and facebook_app_secret
That’s it! Facebook login should work now. Be sure to test it from a “normal” Facebook account, not your developer account.
Troubleshooting
Hosted Customers
If you are a Discourse hosting customer, contact us via the email address on your site dashboard and we will be happy to assist.
If you’re hosted by another provider you will need to contact them for any server-related tasks or issues.
Self-hosters
If the Facebook app API is updated, or the app ID/secret are changed, you’ll need to remove existing associations from your site before users can log in again. To remove this data, run the following:
cd /var/discourse
./launcher enter app
rails c
UserAssociatedAccount.where(provider_name: "facebook").delete_all
결국 Facebook 로그인을 사용자가 가입할 수 있는 방법으로 설정할 수 있었습니다 (원래 앱은 Facebook이 GDPR 준수를 업데이트한 후 작동이 중단되었습니다). 관심 있는 분들을 위해, Facebook에서 완전히 새로운 앱을 생성하고 첫 번째 게시글에서 언급된 단계 외에도 Facebook 개발자 페이지에서 다음 단계를 수행해야 합니다:
App Review → Permissions and Features
public_profile → Get Advanced Access 클릭 → 설명에 따라 진행
email → Get Advanced Access 클릭 → 설명에 따라 진행
이제 사용자는 Facebook을 통해 가입할 수 있으며, 구독한 게시물의 이메일 알림도 받을 수 있습니다.
Facebook 로그인 플로우 전체 (Facebook 로그인을 구현했다면, 앱 사용자가 Facebook 로그인 버튼을 찾는 과정을 보여주세요).
앱 사용자가 Facebook 로그인 없이 계정을 생성하고 로그인할 수 있는 경우, 앱의 계정 생성 및 로그인 플로우.
앱이 액세스할 수 있는 각 권한에 대해, 해당 권한이 필요한 데이터에 액세스하는 앱 사용자의 모습을 보여주시고, 앱이 해당 데이터로 무엇을 하는지도 보여주세요.
앱이 요청하는 권한을 사용자가 거부했을 때 어떤 일이 일어나는지 보여주는 Facebook 로그인 플로우.
앱 내 개인정보 처리방침의 위치. 개인정보 처리방침 링크를 클릭하여 방침의 내용을 보여주세요.
앱 내부 콘텐츠.
소셜 플러그인(있는 경우) 및 사용 방법. 예를 들어 페이지 좋아요 또는 팔로우, Facebook에서 콘텐츠 공유, 친구 초대 또는 태그 지정 등. 앱이 다른 플랫폼(Connect, iOS, Android, Canvas…)에서 사용 가능한 경우, 해당 플랫폼에 대해 위 정보를 모두 보여주세요.
수정: Discourse 포럼을 관리하는 친구도 Facebook에서 같은 이메일을 받았다고 하더군요. 그리고 실제로 Facebook 계정이 연결된 사용자가 몇 명이나 되는지 궁금해했습니다.
다음 쿼리를 data explorer에서 사용하여, 최근 1년 동안 최소 1회 이상 게시하고 Facebook 계정이 연결된 사용자의 수를 조회할 수 있습니다:
SELECT count(*)
FROM users
LEFT JOIN user_associated_accounts ON user_id = users.id
WHERE last_posted_at > now() - '1 year'::interval
AND provider_name = 'facebook'
모든 사용자와 비교하고 싶다면:
SELECT count(*)
FROM users
WHERE last_posted_at > now() - '1 year'::interval
제 포럼에서는 최근 1년 동안 최소 1회 이상 게시한 사용자가 411명이며, 그중 30명이 Facebook 계정을 연결하고 있습니다. 하지만 그들이 실제로 사용하는 것은 아닙니다.
수정: 완료했습니다. 제 포럼에서 Facebook 기능을 비활성화했습니다. 아마도 손실이라고 생각했지만, 이를 공지하자 많은 좋아요를 받았습니다 . 결국 제 커뮤니티들은 Facebook을 그렇게 좋아하지 않는 것 같습니다…