◷ Reading Time: 7 minutes
This extension allows users to authenticate and post tweets for their own account or on behalf of a different account.
Creating your Twitter Developer Account
The very first step of using the Twitter extension is to create a Twitter developer account. You can either use an existing Twitter account or create a new one.
1. If you already have an account, apply for API access. https://developer.twitter.com/en/apply-for-access.
After applying for developer access, Twitter will send a verification link to your registered email to start their review process.
Once your account is verified and been granted developer access, you are now able to access the developer portal https://developer.twitter.com/en/portal/dashboard.
2. Take note of your Consumer Keys (API key and API secret key)
This acts as the identifier of your application which will be used by the Twitter extension.
3. Change the App permissions and Authentication settings of your application in order to integrate it with the Twitter Extension.
Change the App permission to Read and Write and enable the 3-legged OAuth. The 3-legged OAuth requires a Callback URL where Twitter will send the Access Token and Secret, however, the Twitter extension does automate this for your application. You may opt to just provide a dummy URL (or just your Twitter profile link) but we recommend using your organization’s website for this.
Token and Token Secret are needed to verify the Twitter account to be used for the API call, for example, the account that will post a tweet. There are 2 ways to generate these tokens:
1. Using the Twitter Developer Portal
Using the Twitter developer portal. This is the scenario where the same Twitter and developer account is used for interacting with Twitter.
Go back to your developer portal, under Keys and Tokens generate and save the Token and Token Secret.
2. Using the Extension for Twitter Authentication
This is the scenario where your developer account will act on behalf of a different Twitter user/s. You can also use this to generate the tokens for your own developer account.
When the Twitter Extension is installed, the Toolbox will be updated for Workflow models.
To avoid suspension of accounts and failed API requests
- Follow the media best practice.
- Follow the rate limit (for example frequency of tweets).
- Follow the automation guidelines.
The following tutorial shows you how to authenticate and post a tweet.
1. Create a Flow
2. Create variables for Consumer Key, Consumer Secret, Username, Password, and set the values. Also, create variables for Copy Access Token To and AccessToken.
3. Add Authenticate and provide details.
4. Change the Value Type of Consumer Key, Consumer Secret, Username, Password, Copy Access Token To and AccessToken to Expression.
5. Add Post Tweet and provide details.
6. Change the Value Type of Consumer Key, Consumer Secret, Token and Token Secret to Expression
7. Run or Debug your project.
Once the tweet is posted you will be able to verify it from the Parameter TweetUrl.