How to create WordPress Facebook login

WordPress Facebook Login

Author:

Webtonative

7 February, 2024

Share

You will need the following 2 things before setting up a Facebook social login.

Facebook Developer Account

  • Follow the Following document from the official Facebook website to register as a Facebook developer if you have not already done so.
  • (https://developers.facebook.com/docs/development/register)
  • A registered Facebook App with Basic Settings configured.

Steps To Create a New App

  1. Go To https://developers.facebook.com/apps/ and click on Create App Button

Screenshot 2024-02-15 110427.png

  1. Select "Set up Facebook Login" and click on next

Screenshot 2024-02-15 110538.png

  1. Select "website" as a platform Which platform will you use for your app? option and click on next.

Screenshot 2024-02-15 110642.png

  1. Fill other details
  • App name
  • Developer email id
  • Select a business account if you have any
  • Click on Create App.
  1. You will be redirected to a detail page.
  • Click on settings
  • Click on Basic
  • Here you will find your app ID and app secret (update these in the WordPress plugins section)
  • Provide privacy policy URL and user data deletion URL here.
  • Click on Save changes

Steps to enable Facebook login in the app

  1. On the left menu click on App Review
  • Click on "Permission and Features"
  • Make sure email and public_profile permission is enabled if you are creating the app first time or following the next step Screenshot 2024-02-15 110855.png
  • Request advance access for email and public_profile
  1. Click on products
  • Click on configure (settings) Screenshot 2024-02-15 111039.png
  • Suppose https://my-wordpress-domain.com is the domain of your WordPress hosting
  • add https://my-wordpress-domain.com/wp-json/webtonative/social-login/verify/facebook URL to "Valid OAuth Redirect URIs"
  • Click on "Save changes" Screenshot 2024-02-15 111222.png
  1. Complete business verification by clicking on "verification" from the side menu. This is a required step, social login won't work if verification is not done.

  2. Click on "Go Live" from the side menu.

  • Click on the "Go live" button at the bottom. Screenshot 2024-02-15 111317.png
  1. Copy the app ID and app secret and paste them into the social login plugin in the WordPress admin section.

Screenshot 2024-02-15 111440.png

  1. The Social Login button will be visible on the login page of your website above the Remember Me button.

Screenshot 2024-02-15 111608.png

  1. if you want to show a social login button on any custom theme page, use Shortcode [webtonative_social_login] to display the social login button on that page.

Screenshot 2024-02-15 111746.png

  1. By default WordPress will logout the user once the tab is closed. If you want to retain the user logged-in status even after the tab is closed on webtonative social login configuration page enable remember me checkbox.

Screenshot 2024-02-15 111856.png

  1. By default on successful login user will be redirected to the root path of the page i.e. https://your-custom-domain.com/ if you want to modify the redirect domain update the redirect URI in webtonative social login configuration

Screenshot 2024-02-15 112007.png

Similar Blogs

companyLogo

Transforming your Digital Vision into Reality.


media-icon
media-icon
media-icon
media-icon

2024 Orufy Technologies All Rights Reserved.