Twitter Setup

One of our example applications prints an ongoing timeline of live “tweets” from Twitter. To access this feature, even if you don’t use the Twitter service personally yourself, you’ll still need to sign up for an account to use the search function in software. If you don’t yet have one, begin at the Twitter home page and use the sign-up form.

In addition to some basic account information, you’ll need to provide a real email address in order to confirm and activate the account. Within a few minutes you should receive an email with an activation link.

Once you have an account and have logged in, you can then proceed to apps.twitter.com (the Twitter Developer App home page). Click "Create new App"

You’ll be asked for some basic information about your application — the tweet-printing program we’ll be loading on the Raspberry Pi. Provide a reasonable name and description…we don’t know if applications are audited, but being honest and descriptive here would be helpful. You also need to provide a Website URL. If you have a personal or company web site, enter that on the form, else you can use Adafruit’s home page.

You’ll need to agree to the developer terms of service before finalizing your application. Read, agree, and click “Create your Twitter application”:

There used to be a CAPTCHA here. Now, Twitter requires that you add a mobile phone number to your account, if not already assigned. A verification code will be sent to this number.

Once you complete these steps and the app is created, you’ll have the credentials needed to authorize your application. Click on the “Keys and Access Tokens” tab. On the next page of this guide we’ll copy and paste the “Consumer Key” and “Consumer Secret” strings into a Python script.

Do not share these strings with anyone—they’re for the secure and exclusive use of your application. If you’re sharing source code via Github or other management system, remember to remove these before posting the code!
Last updated on 2017-04-23 at 12.39.18 AM Published on 2013-04-12 at 11.38.58 AM