Creating a Twitter Application
To interact with Twitter, you need to create a Twitter application. In this case you most likely also want to create a new Twitter account if you already have one to prevent testing the Twitter API and annoying your followers.
You can sign up for a Twitter account and pick a new, unique name at https://twitter.com/signup. The game you build in this chapter is a simple Hangman game. After you complete the signup and confirm your account, go to: https://dev.twitter.com. This is the Twitter developer site where you can find documentation and create Twitter applications. You need to log in again with the account that you just created.
When logged in, mouse over your account name in the top right and click My Applications. On the applications page, click Create New Application (see Figure 22-1).
Figure 22-1: The Application setup screen.
Fill in the first three required fields: Name, Description, and WebSite. (You may need to get a little creative to come up with a unique name.) Accept the terms of use, fill in the captcha, and submit the form. Your application’s settings screen displays.
Because the game is going to tweet, you need to change the permissions for the app. Click the Settings tab and then scroll down the page to Application Type. Change the type from Read Only to Read and Write and click Update.
To make it easier to start with the API ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access