Thursday, 11 December 2014

How to create twitter app account and create twitter applications that can download/upload tweets and then load to Hadoop?

How to create twitter app account and create twitter applications that can download/upload tweets and then load to hadoop?

To create any twitter application that can download or upload tweets to twitter, you first start with creating an application account on twitter. Creating the twitter application account is simple. Follow the steps below:

Step1: Login to your twitter account and then open the dev.twitter.com url. Go to Manage your app link on dev.twitter.com site.


Step2: Click on the create app link.


Step 3: Enter the information in the twitter create application form and press the create application button.
 Step4: Once you create the application, login to the application and change the settings, access tokens, etc.


Step5: change the permission to read and write, so that your application can download and upload twitter. You will need the access tokens in the application your are building to access your twitter account. Also, check the Allow this application to be used to Sign in with Twitter box on the settings tab.

 
Step6: Use java (twitter4j.org) or some other libraries available online to create your application that can do twitter upload, search, download .

The Java program I tried to read tweets is from this link:

http://www.javacodegeeks.com/2011/10/java-twitter-client-with-twitter4j.html

You need to download the twitter4j jar files from www.twitter4j.org website and set up the jar files in your eclipse before you use the java program in the link above.

The tweets can then be loaded to hadoop hive using a simple technique explained in the post:

http://dwbitechguru.blogspot.ca/2014/11/how-to-load-local-data-file-into-apache_25.html