How to connect with a Twitter Custom App
As promised we've restored the complete functionality of Twitter. Now you would be able to add your own Twitter app's consumer id and the secret to authenticate the application. And this will enable full access to all of the functionalities.
Following are the steps and information you need to get started. In order to connect a custom app to Twitter, you need to first create a Twitter app, then set up the app and connect the app to Twitter.
In this article, we'll cover the following topics:
- How to create a new Twitter App
- How to Set up your new Twitter App
- How to connect with a custom Twitter App
How to Create a New Twitter App
1- Go to https://developer.twitter.com
2- Sign in with your Twitter account.
3- Click on the “Developer Portal” button in the top right corner
4- From the petitions page, either subscribe to the paid plan or sign up for a free account. For this example, we will sign up for free.
5- Fill out the developer agreement form.
You would need to describe all of the use cases required by the Application. For Content Studio we would be using the API for the following cases:
- Scheduling and publishing Tweets
- @mentioning Twitter accounts
- Analytics
- Social Inbox
Here is a sample text to give an idea of what the description would look like.
With Twitter API access, I want to schedule and publish tweets, track mentions, reply to comments on my tweets and respond to customer inquiries and complaints in real time. I want to utilize the data returned from the API to help me display and gauge my tweets' performance, impressions, and engagements, along with other metrics.
6- Click on Submit! In most cases, you will get access to the developer portal right away.
How to set up your new Twitter App?
1- When the creation steps are completed and your Twitter Developer Account is approved you would be navigated to the dashboard now let’s set it up.
2- From the left side menu, click on “Projects & Apps” and click on the “Default project-123xyz..” label.
3- From the Settings tab, click on Edit. Add your project name, use case, and description. These don’t need to be specific to Content Studio and you can add your own details. When done, click on Save.
4- Now, from the left side menu select the application name that is displayed under the project name that we just edited.
5- Edit the “App details”, and provide the name, app icon, and short description of your application.
6- Edit the “User authentication settings”
a- App permissions: Select “Read and write” permission
b- Type of App: Select “Web App, Automated App, or Bot”
c- App info: Please make sure to add the callback URL of Content Studio here. This is really important as this is required to authenticate the application when connecting with Twitter.
Also, you would need to provide the URL to your website here, the other options are all optional.
7- Click on Save!
8- On successful completion of this step, you would be shown the OAuth 2.0 Client ID and Client Secret for your application. Copy and save them in a safe location, in the future, they would not be shown in full and would need to be regenerated if there is any mistake.
These client details are for v2-level authentication, ContentStudio uses the v1.1 method and you would need the “Consumer Key” and “Consumer Secret” to authenticate the application.
How to connect with a custom Twitter App?
1- Log in to Content Studio
2- Click on the 3 dots in the top right corner and select Social Accounts
3- Navigate to the Twitter section and click on the “Connect Twitter Profile” drop-down, and
4- Click on “Add New Custom App”.
5- From the modal add the Twitter App’s name, API Key, and Secret in the text field.
a- In a different tab navigate to https://developers.twitter.com
b- Click on “Developer Portal”
c- From the left side menu, click on “Projects & Apps”, select your project, and then the App.
d- Click on the “Keys and Tokens” tab, and from the “Consumer Keys” sections click on “Regenerate”. Copy and paste these generated keys to the form in ContentStudio.
6- Add our Callback URL to Twitter:
a- Copy the callback URL for Content Studio https://api-prod.contentstudio.io/twitter/connect
b- On the “Settings” page find the “User authentication settings” section and click on Edit.
c- On this page find the “App info” section and paste the URL in the “Callback URI / Redirect URL” text field and click on Save
Go back to Content Studio, click on the checkbox confirming that you’ve added the callback URL, and click on Proceed to start the authentication process. That's all you are now ready to post on Twitter