Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

twitter

tweets

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.

like image 457
Sravan Avatar asked Jun 13 '13 13:06

Sravan


People also ask

How do I get my Twitter oauth token?

Generating access tokensLogin to your Twitter account on developer.twitter.com. Navigate to the Twitter app dashboard and open the Twitter app for which you would like to generate access tokens. Navigate to the "Keys and Tokens" page. Select 'Create' under the "Access token & access token secret" section.

How many tweets can be fetched using Twitter API?

If you exceed a 15-minute limit, then waiting a minute or two before retrying makes sense. Note that beyond these limits on the number of requests, the Standard Basic level of access provides up to 500,000 Tweets per month from the recent search and filtered stream endpoints.


1 Answers

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.

like image 129
Jimbo Avatar answered Oct 19 '22 15:10

Jimbo