Twitter Aggregator (CMTA) - Options - Twitter API (Connecting The Plugin To Twitter)
Connecting The Plugin To Twitter
Cost This guide involves the Twitter API, which may be paid depending on the plan. Learn more: Pricing — Twitter DevelopersAbout This tutorial covers interface and processes of a third-party service and they may change at any time. If you believe this guide is outdated, please contact us.
In order to connect the plugin to Twitter, you will need two things: the API Key and the API Secret.
This guide shows you:
- About API Keys
- How to obtain the Twitter keys
- How to add them to the plugin
About API Keys
What Are API Keys
API Keys are a string of text, much like a password, provided by a service (in this case, Twitter).
They work as a bridge between your platform (the Twitter Aggregator plugin) and a third-party service (Twitter).
Twitter API Tiers and Limitations
Currently there are these Twitter Search APIs tiers: Standard, Premium (30 days), Premium (Full Archive) and Enterprise. This plugin does not support Enterprise.
Standard is free. Premium has a cost, but comes with fewer restrictions - if you are using Twitter services extensively, consider apply to them. You must declare which one you have on the plugin's settings.
Below is an example of the dashboard, where you can monitor the API usage.
The method explained on this article grants a Standard Search API. There's an important restriction: it only fetches tweets published in the past 7 days when a using hashtag as a Twitter source.
Learn more about the each tier on Pricing — Twitter Developers.
Obtaining The Twitter Keys
To get the keys, you have to apply for a free developer account and make an app. This is easier than it sounds - it's just about providing Twitter with basic information.
First Step: Applying for the developer account
- Access https://developer.twitter.com/en/apply/user and login with your Twitter account.
Apply for a developer account. Note that you will need to have a verified telephone number associated to your account.
Select the access type - for organization of personal use. Then, fill the required fields.
Give some details about how you are going to use Twitter on your website.
Read and agree to the Terms of Service.
- Check your email for a verification link.
Wait until Twitter confirms your data.x
Congratulations! Now, log in to your new developer account to fetch the keys.
Second Step: Fetching the keys
- Check the top menu and, under Test Project, click on Get Started.
Create an app.
Fill all required fields.
Important: for "Callback URLs", add the URL of your website.
Review the Developer Terms.
In the app screen, click on
Keys and tokens.
There you have it! These are the two keys that we need to input into the plugin settings.
Configuring The Plugin
Navigate to Admin Panel → Twitter Aggregator → Options.
Click on Twitter API tab.
You should add the keys here.
- Consumer Key (API Key) - Consumer Key (API Key).
- Consumer Secret (API Secret) - Consumer Secret (API Secret).
Please read the Twitter API limits section to take into account the rate of calls the plugin will be able to make to Twitter. Also adding multiple categories which have very short refresh rate might affect your server performance.
You can click Test Twitter API to check if the keys are working correctly.
Tier of Search API
Choose your current Search API tier:
- Premium (30 days)
- Premium (Full Archive)
Tier of Search API
Development environment name - You can fetch this name from this page: https://developer.twitter.com/en/account/environments
Below are some highlighted examples of the relevant field:
- Include retweets - Include retweets from timeline.
- Exclude replies - Exclude replies from timeline.
- Language - Tweets will be filtered only to selected language. Leave empty to remove filter.
The Language feature is not compatible with the Premium tier. Learn more about the each tier on Pricing — Twitter Developers.