Setting up your Twitter Account for Collecting
Published: April 25, 2019
Table of contents
- Steps for Creating a Twitter Application
Steps for Creating a Twitter Application
Please note that these instructions may be subject to change with updates to Twitter. If the following steps and screenshots do not match precisely, please use this as a general guide, or contact DocNow.
If you do not have a twitter account, create one at twitter.com. A twitter account is required for access to twitter data.
Log into you twitter account to set-up and and authorize a twitter application. A Twitter application will let you download twitter data using Python.
Create an app at developer.twitter.com/en/apps
Following the above link should bring you to this page:
Click on ‘Create an App’
You may be prompted to create a Twitter developer account. Select ‘Apply’ and continue:
Setting up a Twitter Developer Account
If you already have a developer account set up, skip to Creating a Twitter App.
Select a user profile to associate with the developer account, and select ‘Continue’.
In the ‘Account details’ section, select your request for access for either your organization or for personal use.
Note: Selecting “for my own personal use” offers the simplest and quickest method of setting up a developer account. If you are following this guide for research or teaching purposes, an individual, personal account is suggested. Twitter users can only have a single development account, and cannot change account types. An ‘Organization’ account differs in that it allows for additional twitter users to share access on a single dev account, however, this is mainly geared toward commercial use and is intended for development for premium APIs ($), and is outside the scope of this guide. For more, see Twitter’s FAQ.
- If you select “for my own personal use,” you will be prompted to fill in an Account Name and to select your Primary Country of Operation. Both are required.
In the next section on ‘Use Case Details’, answer several questions about your project and why you are building an app to gather twitter data. You can provide answers similar to the ones below if relevant to your project. Most importantly note that this is for academic purposes and that you will not be Tweeting, Retweeting, or liking content.
Note: If your project does involve analysis of twitter content, an answer for question #2 might look something like “Yes, my project will analyze tweets using text analysis, word clouds, word frequency, and word association using R.”
Read and Accept the Twitter Terms of Service.
Verify your Twitter Development Account via the email associated with your Twitter account.
Creating a Twitter App
Once you have your Twitter Developer Account set up, you can register an application at developer.twitter.com/en/apps. Click ‘Create an App’ to begin:
Fill out the required parts of the form for App Details. For the Website URL, you can simply put the URL for your twitter account, or any website you are affiliated with:
Click ‘Create’. A pop-up may appear for reviewing the Twitter Developer Terms, click ‘Create’ to continue.
You now have a registered Twitter app! You can edit any of these fields later from your Developer Account Apps page.
Accessing Keys and Tokens
From your Developer Account Apps page, find your app and click ‘Details’.
Select the option for ‘Keys and Tokens’. On this page you will find your Consumer API keys. Under ‘Access token & access token secret’, click ‘create’ to generate.
Note down for use with Twarc these four alphanumeric values:
- Consumer API key
- Consumer API secret
- Access token
- Access token secret
Next, get Twarc up and running: Installing and Configuring Twarc