General Support - Social Login - Facebook
Social Login - Facebook
- Please note that Facebook often changes its developer service and the user interface may change after publishing this article. If you notice any error in our documentation please let us know at firstname.lastname@example.org.
All Facebook Apps require a secure protocol (HTTPS) for Redirect URIs since March 2018. Check Facebook's blog for more information.
- This document was last updated in March 2020.
What is Social Login
Once you have enabled the WordPress Facebook login option, users will be able to register, log into your Q&A using their Facebook profile, and submit Questions or Answers to your WordPress discussion forum (this is the same for the WordPress File Manager Plugin or WordPress Registration Form Plugin).
This setting can be customized to specifically allow Facebook authentication within the plugin settings panel. If this setting is left empty, the Facebook login option will not appear at the authentication stage.
To register your site with a WordPress Facebook login, take the following steps.
1. Create a Facebook developer account on https://developers.facebook.com/
2. Create a Facebook App
Go to https://developers.facebook.com/ and under the My Apps drop-down menu, click on the Add a New App.
Input any name desired and your email address.
You may have to solve a reCaptcha test before the next step.
3. Add Facebook Login
Head to the Dashboard. There, add the product "Facebook Login" on the Product Setup page.
You will be prompted with the Quickstart screen, but there is no need to use it.
Instead, check its settings.
4. Enter the OAuth redirect URI
In the Client OAuth Settings section, enter the Valid OAuth redirect URI.
The Valid OAuth redirect URI can be found in the plugin's settings, next to the Facebook App Settings. It usually ends with "/facebook/int_callback". An example from the WordPress Questions and Answers plugin:
Save Changes at the bottom of the page.
5. Make your App public
Go to the App Review page (on the sidebar menu)
And make your App public:
6. Take note of the App ID and the App Secret
Click on Settings → Basic and you will see the App ID and the App Secret in the Dashboard box. Take note of them.
7. Add your site URL under App Domains
Remember only HTTPS domains are allowed. Using a HTTP domain will prevent the connection from working
8. Copy your App ID and Secret to the CM plugin's settings
In the plugin settings panel, add these App ID and App Secret values in the following fields:
Then save the plugin settings. Well done! Your WordPress Facebook login is up and running!
Facebook connection errors can occur for several reasons:
- Problem: Facebook App was defined in sandbox mode.
- Solution: Please check your app definitions
- Problem: Category was not defined for App.
- Solution: Please check your app category definitions.
- Problem: Your server configuration needs to be modified.
- Solution: Please check if allow_url_fopen is enabled in the global php.ini file on the server. For more info please check stackoverflow.
- Problem: Facebook connection errors can also be caused by the Facebook authentication code being too long. In that case, the server responds with 414 Request- URL Too Long, when Facebook sends its authentication code.
- Solution: Please change the setting LimitRequestLine in Apache configuration to a higher value, or contact the administrator.
- Problem: App is not available for public users.
- Solution: Please change your Facebook app to public accessibility mode.