General Support - Social Login - Facebook


Social Login - Facebook

Back to User Guides

Important

  • 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 support@cminds.com.
  • All Facebook Apps require a secure protocol (HTTPS) for Redirect URIs since March 2018. Check Facebook's blog for more information.

    Using HTTPS
    Using HTTPS
  • 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.


Tutorial

To register your site with a WordPress Facebook login, take the following steps.

1. Create a Facebook developer account on https://developers.facebook.com/

Creating a Facebook developer account
Creating a Facebook developer account

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.

Creating a Facebook App
Creating a Facebook App

Input any name desired and your email address.

Adding name and email
Adding name and email

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.

Choosing a Facebook Login product
Choosing a Facebook Login product

You will be prompted with the Quickstart screen, but there is no need to use it.

Choosing the platform
Choosing the platform

Instead, check its settings.

Navigation to settings
Navigation to settings

4. Enter the OAuth redirect URI

In the Client OAuth Settings section, enter the Valid OAuth redirect URI.

Adding Valid OAuth redirect URI
Adding 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:

Where to find Valid OAuth redirect URI - Wordpress Question and Answer Plugin
Where to find Valid OAuth redirect URI

Save Changes at the bottom of the page.

Saving changes
Saving changes

5. Make your App public

Go to the App Review page (on the sidebar menu)

App Review
App Review

And make your App public:

Making the App public
Making the App public
Confirmation popup
Confirmation popup

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.

Where to find App ID and Secret
Where to find App ID and Secret

7. Add your site URL under App Domains

Remember only HTTPS domains are allowed. Using a HTTP domain will prevent the connection from working

Adding allowed domains
Adding allowed domains

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:

Adding App ID and Secret to the plugin settings
Adding App ID and Secret to the plugin settings

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. 
  • Problem: Category was not defined for App. 
  • 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.


WordPress products can be found at CreativeMinds WordPress Store

Let us know how we can Improve this Product Documentation Page 

To open a  Support Ticket visit our support center
Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.