Twitter Aggregator (CMTA) - Options - Twitter API (Connecting The Plugin To Twitter)
Connecting The Plugin To Twitter
About 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 Levels and Limitations
Currently there are the following Twitter API access levels: Essential, Elevated and Academic Research. This plugin supports work with Twitter API v2 and demands the minimum level Elevated.
Below is an example of the dashboard, where you can monitor the API usage.
This guide covers work with the Elevated access level that is free.
Obtaining The Twitter Keys
To get the keys, you have to apply for a free developer account and make an app. First, you need to get the access to the first level - Essential, then upgrade it to Elevated.
Access Developer Platform and login with your Twitter account. Navigate to Products → Twitter API.
Then, scroll down to the bottom of the page and click Get Started.
Apply for a developer account. Note that you will need to have a verified telephone number associated to your account. If you haven't done it yet, you will see the relevant message - click the button Add a valid phone number and follow the instructions.
Then get back to the page and scroll down. Fill the data in the needed fields and click Next.
Next - accept the Developer agreement & policy.
Then you need to verify your email.
After an email verification you need to create your App. Give it a name and click Get keys.
The API Key and API Key Secret are created. You need to store them - they will be needed later in the plugin.
Now you need to upgrade your account to the Elevated access level. Head to the dashboard. In the Developer Portal dashboard navigate to Products → Twitter API v2 → Elevated, then click Apply for Elevated.
On the next step, fill the fields with basic info and click Next.
On the next page, you need to give detailed answers to the set of questions about how you are going to use Twitter API. When you finish, click the button Next.
On the next page Review you can check your data and answers. If everything is ok, click Next.
Last step - accept the Developer agreement & policy.
Then you need to wait when the request will be approved. You will receive an email when it's approved, or email that requests additional information.
Configuring The Plugin
Now we can add API to our 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)
Learn more about 30 days and Full Archive searches here.
- 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.