WP Social seamlessly integrates with all the popular social media platforms. You can add social login options on the website using this WordPress social media plugin. Like other popular platforms, you can add the Twitter login option on your WordPress site.
Read this documentation to learn the process of WordPress Twitter Login integration with the WP Social plugin.
Getting Started #
To allow your visitors to log in with their Twitter accounts, first, you have to create a Twitter App for your website. The following guide will help you through the Twitter App creation process. After you complete creating the Twitter app, head over to “Settings” and configure the given “APP ID Key” and “APP Secret Key” generated by your Twitter App to complete the WordPress Twitter login integration process.
Create Twitter App #
- Go to https://developer.twitter.com/en/apps
- Log in with your Twitter Account ( if you are not logged in )
- Click Create an App button. It will take you to the app creation page.
- If you don’t have a developer account, apply for a developer account by clicking Apply button. You will end up on the Welcome page.
- From welcome page, you will need to select the reason why you want to use Twitter Developer Tool.
- Once you select a reason, click Next button at the bottom.
- Now click Apply for a Developer Account. You also can read about Twitter Developer account terms.
- You will also need to fill up Developer account form.
- Once you have the developer account, log in to your developer dashboard.
- Create a new project if you don’t have one yet.
- Once you click the Create project button, it will take you to the project creation page.
- Enter a succinct and meaningful name for your project.
- Click Next button.
- Now select a use case for why you want to use Twitter API.
- Click Next button.
- Now Enter your project description.
- Click Next button.
- In the final step of project creation process, you will have to enter a unique name for your app.
- Click the Complete Button.
- From the left menu panel click Project & Apps > your project > Your app.
- From App permissions click Edit button > select read and write > click Save.
- From the Authentication section, click the Edit button.
- Enable third-party authentication.
- From the authentication page, you will need to fill up Callback URL and Website URL.
- Additionally, you can fill in other information.
You will find the redirect URL or Callback URL from WP Social Plugin.
- Navigate to WP Social > Social Login > Providers from your WordPress dashboard.
- Open the Twitter App settings.
- Click the Getting Started button on Twitter login.
- Copy the “Valid OAuth redirect URL“.
- From the left menu panel click Project & Apps > your project > Your app > Keys and Token tab.
- From Keys and Token tab click View Keys button.
- From here you will be able to collect App ID and App Secret.
Set up WordPress Twitter Login on WP Social #
After the successful Twitter app creation, the next step is to add setup Twitter with credentials (APP ID and APP Secret key) to your site. For that, first log in to your WordPress site, then,
- Navigate to WP Social > Social Login from your dashboard.
- Switch to the Providers tab.
- Click to Settings under Twitter.
- In the popup, move to the Settings tab.
- Enter the App ID in the required field.
- Enter the App Secret in the required field.
- The click Save Changes button.
Add Login Button Label #
You can customize the button label for Twitter Login. To add/change the button label,
- Move to the Buttons tab.
- Enter Login Label Text.
- Enter Logout Label Text.
- Then Save Changes.
Find Shortcodes and Simple Link #
You can use Shortcodes to add Twitter Login on any page. You can find the shortcodes in the Usage tab. Read the documentation of WP Social Shortcodes Usage to learn how to use those shortcodes.
You also find a Simple Link for the Twitter Login button.
Finally, the Twitter social login integration process for WordPress is completed. Now, you are able to add a Twitter Login button to your website and let the user log in to the website using their Twitter Account.