Social Login: X(formerly Twitter) API v2 Setup
Overview
This document will provide instructions on how to set up an X(formerly Twitter) application API version 2, so users can register or log in via X on your site. You need to purchase and activate social login extension for this setup to work.
Creating a Project
You need to create a project first before you create a new app. Do the following steps below to create a project:
- Go to the Twitter App developer portal: https://developer.twitter.com/en/portal/projects-and-app.
- In the left side menu, below Projects & Apps, click on Overview.
- Under the Elevated Section, click the "+ Add Project" button to add a new project.
- Set the name of your project and click on the Next button.
-
Select how you intend to use the Twitter developer platform from the drop-down menu, and then click on the Next button.
-
Type and describe your project in the text area. Click on the Next button.
Creating a new app
To create a new Twitter app, you need to do the following steps below:
Setup App
- You can continue by clicking the "App settings" button or you can go back to the Twitter Developer Portal https://developer.twitter.com/en/portal/projects-and-apps
- Under the Projects & Apps menu, go to the project you have created and click on your Twitter App's Name.
- In the User authentication settings, click on the "Set up" button to open the user authentication settings.
- To enable OAuth 2.0, first, you must select from the three permissions under App permissions to enable OAuth 1.0a Authentication and select your app type.
- Now, add your URLs to the callback URLs in the App info.
Add your Redirect URIs. See the example below: - Don't forget to add URLs for other required fields such as Website URL, Terms of Service, and Privacy Policy. Click the Save button when done.
You can now test and check if the X Login or Register Button Appears in the Login form or Register Form, make sure that the Show Social Connect login forms or registration forms are enabled in the Social login settings from wp-admin>Ultimate Member> Settings> Extension> Social login.