Wednesday, September 3, 2014

How to Register a Twitter Application for Twitter4J

Abstract
These are steps for registering a Twitter application and getting the following values needed by Twitter4J:
OAuthConsumerKey
OAuthConsumerSecret
OAuthAccessToken
OAuthAccessTokenSecret
Step 1
Go to Twitter OAuth client page:

Step 2
Click the "Create new app" button (figure 1).

Figure 1: Create New App button
 
Step 3
Fill out all the information for your application.  For the website information, I typically use either my SourceForge or GitHub websites, depending on where the source code for the project resides.

Step 4
When you are done entering your application information, click the "Create your Twitter application" button (figure 2).

Figure 2: Create your Twitter application button
 

Step 5
Click the "Test OAuth" button. (figure 3)

Figure 3: Test OAuth button

Step 6
After you click the "Test OAuth" button, the information shown on the page will give you the values for the following Twitter4J values (figure 4).
ConsumerKey
ConsumerSecret
Figure 4: Twitter4J ConsumerKey & ConsumerSecret


Step 7
Click the "application details page" link (figure 5).

Figure 5: The application details page link


Step 8
Click on "API Keys" tab at the top of the page (figure 6).

Figure 6:The API Keys link


Step 9
Scroll down and click on "Create my access token" button (figure 7).

Figure 7: The Create my access token button
Step 10
After you click the "Create my access token" button, the page will refresh (or you may need to do it manually) and the information shown on the page will give you the values for the following Twitter4J values (figure 8).
AccessToken
AccessSecret
Figure 8: Twitter4J AccessToken & AccessSecret


DONE

No comments:

Post a Comment