![]() Twitter (twitter.com) |
|
Protocol | OAuth 1 |
Returned Data | email, userId, name, photo |
Requires SSL? | No |
How to Set Up Twitter API for Magento
In this article, you will learn how to find your Twitter API keys and integrate Twitter Login into Magento Social Login Pro extension and Magento Twitter & Facebook Login extension. Please follow the step-by-step instructions below.
Important Information:
Before you proceed with creating a Twitter Application – first make sure you’ve added your mobile phone number to your Twitter profile. Please read this article for more information.
Step 1. Applying For a Twitter Developer Account
If you created apps earlier, you may continue managing them on a developer platform. However, in order to create a new app, you need to apply for a new Twitter developer account. If you have applied earlier, please move to step 2. Otherwise, please follow the steps below to do it correctly.
Step-by-step guide:
- Sign in to your Twitter account and go to developer.twitter.com. This is a new Developer Platform where you can create and manage all your applications. Please click Apply to access the developer platform. Please note: if you see the Developer Platform instead of the Apply button, it means that you have already applied for access to it and should skip to step 2 of this tutorial.
- Click Apply for a developer account to proceed.

Step-by-step guide:
- Once the Developer Portal opens, specify how you intend to use the developer platform. Please select Professional.
- Next, choose Build customizes solutions in-house.
- Click Get started.

Basic Info
Now you are to set up your developer account in 5 steps to complete the application form to access the Twitter developer platform. Please follow the steps below and provide the required information correctly.
Step-by-step guide:
- The provided username and email address will be associated with your developer account. If you want to change them, click Switch @username and Change email address.
- Create the name for your developer account.
- Select the country of residence.
- Specify your current coding skill level: No experience, Some experience, or Highly experienced.
- Click Next to proceed.

Team profile
Step-by-step guide:
- Please enter the name of your company.
- Next, specify the username of your company’s Twitter profile.
- Select your company’s country of operation.

Step-by-step guide:
- Choose the category to which your company belongs.
- Specify the industry(s) your company serves.
- Set this option to Yes if your company has or will have customers.
- If the previous option is set to Yes, you should provide the country(s) where your customers are located.
- Click Next to proceed to the next step.

Intended use
Step-by-step guide:
- Please provide a comprehensive description of how you intend to use the Twitter API or Twitter Data. Make sure to specify all the details for the review to be approved successfully.
- Click Next to move to the next step.

Review
Step-by-step guide:
- Please scroll down and check all the information you have provided.
- Click Next.

Terms
Step-by-step guide:
- Please read and agree to the Developer agreement & policy.
- Click Submit application.

Email verification and Account approval
You will see the message informing you that your application has been submitted successfully.

Step-by-step guide:
- At this point, you should go and check your email for a new message with Verify your Twitter Developer Account subject.
- Click Confirm your email in order to verify your email address and submit your account approval request.

After a while, your application will be approved, and you will receive the following email:

Step 2. Creating Twitter Application
Please follow the guide below to create your Twitter API application necessary to integrate Twiller Login into your website.
Step-by-step guide:
- Go to the developer.twitter.com/en/portal/projects-and-apps. This is the Developer Portal, where you can create and manage your projects and applications.
- Click Create App.

Step-by-step guide:
- Create the name for your application.
- Click Next.

Step-by-step guide:
- “API Key“: here is your API Key. Please copy it to paste it later in the Magento admin panel.
- “API Key Secret“: here is your API Key Secret. Please copy it to paste it later in the Magento admin panel.
- Click App settings to set up your application.
Please note that these Keys are displayed only once, so make sure to save them. Otherwise, you will need to regenerate your keys.

Step-by-step guide:
- Click Edit to go change the authentication settings for your application.

Step-by-step guide:
- Switch the toggle to enable a 3-legged OAuth. This setting is required to enable the Sign in with Twitter feature.
- Next, switch the toggle to request email address from users.
- Please provide the Callback URL, which you can find in your Magento admin panel. In the main Magento menu, go to Plumrocket -> Social Login Pro -> Configuration -> Twitter -> Callback URL.

Step-by-step guide:
- “Organization URL“: please provide the URL of your website.
- “Terms of service“: please provide the URL of your website’s Terms of Service page.
- “Privacy Policy“: please provide the URL of your website’s Privacy Policy page.
- “Privacy Policy“: please provide the URL of your website’s Privacy Policy page.
- Click Save to apply your authentication settings.

The Twitter app, along with the API keys, has now been created and configured successfully.
Twitter Integration in Magento 2 Social Login Pro Extension
At this point, you should paste the created API keys into your Magento 2 Social Login Pro Extension configuration. In the main Magento menu, go to Plumrocket -> Social Login Pro -> Configuration -> Twitter.
Step-by-step guide:
- “Consumer Key (API Key)“: paste the API Key into this field.
- “Consumer Secret (API Secret)“: paste the API Key Secret into this field.
- Press Save Config to save your settings.

Twitter Integration in Magento Social Login Pro Extension
In order to integrate Twitter Login into Magento Social Login Pro Extension, go to System -> Configuration -> Plumrocket Inc -> Social Login Pro -> Twitter in your main Magento menu. Then, follow the steps below:
Step-by-step guide:
- “Consumer Key (API Key)“: paste the API Key into this field.
- “Consumer Secret (API Secret)“: paste the API Key Secret into this field.
- Press Save Config to save your settings.

Configuration of the Twitter Magento social login application is now completed.