Setting up Facebook Login in WPDating plugin
1. Overview
This document explains how to configure Facebook Login for a PHP-based website using the latest Meta Developers dashboard. The integration enables users to sign in using their Facebook account and retrieve basic profile information.
2. Prerequisites
Before starting, ensure you have:
-
A Facebook account
-
Access to the Meta Developers platform Meta for Developers
-
A working WordPress website with HTTPS enabled
-
WP Dating Plugin
3. Create a Facebook App
-
Navigate to: Meta for Developers Apps
-
Click Create App
4. App Configuration
4.1 App Details
Fill in the required fields:
-
App Name: Your application name
-
Contact Email: Valid business or support email address
4.2 Select Use Case
Choose: Authenticate and request data from users with Facebook Login
This enables Facebook authentication capabilities for your application.
4.3 Business Integration (Optional but Recommended)
-
Select an existing Business Portfolio, or create one if required
-
Business verification may be required to publish the application publicly
4.4 Review Requirements
Meta will display a checklist of required configurations, such as:
-
Facebook Login setup
-
OAuth configuration
-
Privacy policy URL
-
Data usage requirements
These must be completed before going live.
4.5 Create App
-
Review all configuration settings
-
Click Create App
5. Configure Facebook Login
5.1 Customize Use Case
-
Navigate to Use Cases
-
Locate:
“Authenticate and request data from users with Facebook Login.”
-
Click Customize
5.2 Set OAuth Redirect URI
Go to: Facebook Login → Settings
Add the following: https://yoursitename.com/members?wpdating-facebook-api=login-callback
Click Save Changes
⚠️ Important: The redirect URI must match exactly with your PHP callback URL.
6. Retrieve App Credentials
Navigate to: Settings → Basic
You will find:
-
App ID
-
App Secret
⚠️ Security Note: The App Secret must remain private and should never be exposed in frontend code.
7. Required Application Settings
In Settings → Basic, configure:
-
App Domains (e.g., yourdomain.com)
-
Website URL
-
Privacy Policy URL (required for live mode)
-
Terms of Service URL (recommended)
Important Notes
OAuth Requirements
-
Redirect URI must match exactly
-
HTTPS is mandatory for production
Permissions
Recommended minimum permission set:
-
email -
public_profile(default)
Common Issues
|
Issue |
Cause |
|---|---|
|
OAuth Redirect Error |
Mismatched redirect URI |
|
SSL Certificate Error |
Missing CA bundle in the server |
|
Login restricted |
App still in Development Mode |
|
Email missing |
Permission not granted by the user |
Conclusion
Once configured correctly, Facebook Login provides a secure and seamless authentication system for PHP applications. Proper setup of OAuth, SSL certificates, and app permissions is essential for stable production use.











