HTML and CSS Reference
In-Depth Information
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 applic-
ation'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 without going through the normal OAuth process (which you saw
in Chapter 21, “Going Real Time”), Twitter provides a mechanism to grab an access token. To get the access
token, click the Details tab, scroll down to the bottom, and click Create My Access Token. This generates an
access token you can use directly. (You may need to reload the page because Twitter can be a little slow occa-
sionally to update the information on the page.)
Keep this page open because you need the following four pieces of information from it in the next section:
Consumer Key, Consumer Secret, Access Token Key, and Access Token Secret.
Connecting a Node App to Twitter
To connect to Twitter from Node, use the wonderful module called ntwitter (which was forked from node-
twitter , which was inspired by twitter-node ). The ntwitter module makes it easy to interact with
Search WWH ::

Custom Search