Pulling tweets for demonstrating Twitter API


Hi I am a MS student and have to demonstrate analysis of tweets by pulling sample tweets through Twitter API . However I am not able to pull the sample tweets as its asking for some authentication details. Please help me with the procedure .


Detail description of oAuth

In order to be able to access the Twitter APIs, you need to authenticate using oAuth. For your case it sounds sensible to use App auth with a bearer token. For more information please refer to the Twitter Documentation of oAuth and to the Streaming API Docs.


Thanks for the reply… How to use oAuth since I dont have any apps or website ? Do we have any alternative to pull tweets…? if not please tell me how to use oAuth… I also want to know what to give in call back url in new application form ? Please help with this ASAP as I need the tweets for my project


No, if you want to use the Twitter API you have to use oAuth.
First you have to create an App, don’t worry about the callback URL much, just leave it blank (if this is possible) or enter some dummy URL there, you won’t need it if you want to use Application Auth using a bearer token. Alternatively you could, after creating the App, request tokens on your behalf and just use these. (This is probably easier, depending if you oAuth library or whatever you are going to use is capable of doing App only auth)