Twitter request to get the latest tweets for a hashtag using Twitter API V1.1 using OAuth settings

Sravan picture Sravan · Jun 13, 2013 · Viewed 13.7k times · Source

Can any one explain how to send a Twitter request to get the latest tweets for a hashtag using Twitter API V1.1 using OAuth settings ? I have searched for documentation in Twitter site, but I am incomplete.

Can any one give the sample request & response through RestClient or Advanced Rest Client ?

Thanks in advance.

Answer

Jimbo picture Jimbo · Jun 13, 2013

You have multiple questions here, so I'll answer them one by one.

The search/tweets method

You can search tweets using this method in the 1.1 API. According to those docs, you can pass a q parameter which is "a UTF-8 encoded query of 1000 characters maximum".

The query for your specific requirements

Scroll down on this page and you'll see that you can search for a specific hashtag using #hashtag. Yes, that's it.

How can I make V1.1 requests using OAuth?

Follow the detailed step-by-step post here, using this library to make authenticated requests.