Question

how can you count the count number of tweets for a specific hashtag on twitter? is there a way to avoid php and creating twitter app on the twitter developer site?

i might want to use go or c++ instead of php.

Thanks, Geri

Was it helpful?

Solution

In order to count Tweets in real-time, you will need to use the Twitter Streaming APIs, in particular the statuses/filter endpoint. Using the track parameter with the hashtag you are interested in, you will receive matching Tweets in real-time.

In order to get started, you will need to create credentials for your Twitter app on https://apps.twitter.com/, then consume the API from your favorite language. The fastest way is to use an existing library which will handle the authentication and the connection to the Twitter API for you.

If you want to use Go, I definitely recommend twittergo by @kurrik which supports the Streaming APIs. For other languages, you can take a look at this page on Twitter Libraries.

OTHER TIPS

You can also use tweepy a python API to access twitter APIS . But first you should have twitter streaming API access for that you should have an account at apps.twitter.com

You will always need to create an app on the Twitter Developer portal https://apps.twitter.com/ as this is where you get to manage your API OAuth keys. As Romain says, the best option here would be to use the Streaming API.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top