Configuring Twitter
If you have configured Facebook apps successfully, it’ll not be hard for you to configure the other platforms (Twitter, Google, and LinkedIn). Just follow the quick steps below.
Quick overview of the Social Login Module (Twitter)
Before starting, make sure you have enabled the Social Login & Registration module. This module is available with the Pro plan.
How to get Consumer Key and Consumer Secret from the Twitter app?
You’ll need Consumer Key and Consumer Secret to configure the Twitter registration/login process. Click on the ‘Create an App’ link indicated in the image below.
It will take you to the https://developer.x.com/en/apps page after clicking on the ‘Create an App’ link. You’ll be asked to create an app here. Just click on the ‘Create an App’ button to go further.
Creating A Developers Account
When you click on Create an App, Twitter will ask you to apply for a developer's account if you do not have one.
If you click on Apply, you will be redirected to this window. From here you can choose Basic or Pro plan, But If you want to continue without any Pro plan Just click on Signup for Free Account button.
You may need to agree to their terms and conditions and add reasons of your need as follows:
After submission, you can see the window below:
Now Click on Projects & Apps and click on your Project Setting page, Now click on Edit or Set-Up under the User authentication settings section.
Configure App Settings
- Click on the Edit or Setup button of your app.
- You will be taken to the app settings page as shown below.
- On this page, ensure the “Request email from users” option is enabled.
- In the App Info section, fill in all the required fields:
- Callback URI / Redirect URL(Required)
- Website URL (Required)
- Terms of Service
- Privacy Policy
- After filling in the necessary details, click the Save button to apply the changes.
Regenerate Consumer Keys & Consumer Secret
- Navigate back to the Project page.
- Click on the “Keys and Tokens” section.
- In the Consumer Keys section, click the Regenerate button to generate new keys.
A confirmation pop-up will appear with the message:
“Are you sure you want to regenerate?”. From this pop-up window, click on the “Yes, Regenerate” button to proceed.
Copy and Secure Your API Credentials
- After regeneration, your API Key and API Key Secret will be displayed.
- Copy both credentials and save them in a secure location.
- Treat them like a password or private keys.
- Do not share them publicly or store them in unsecured places.
- Treat them like a password or private keys.
And click on Yes, I saved them. That's it from the Twitter developer account.
Next, go to your WordPress Dashboard and navigate to WP User Frontend > Settings > Social Login. In this section, you’ll need to enter the credentials you saved earlier. Paste the API Key into the Consumer Key field, and the API Key Secret into the Consumer Secret field. Once you’ve entered both values, click on the Save Changes button to complete the configuration.
Note: Make sure you have already generated and selected your Registration and Login pages from WP User Frontend > Settings > Login/Registration. If these pages are not yet created, you can easily generate them by going to WP User Frontend > Tools and clicking on the Install WPUF Pages button. This will automatically create and assign the necessary pages for login and registration functionality.
Now, log out of your website’s admin dashboard and visit the login page. On the login page, you should now see the Twitter Login button displayed, indicating that the integration has been successfully set up.
That's it. Cheers!