Live updates on hashtags




This is my first post on the forms so please bare with and let me know if this needs to move to a different location.

I’m trying to get a callback when new tweets mentioning a given hashtag are posted.

I had a quick look at the API and did a few tests with the console and as far as I understood I can use the Search API to get the most recent recents tweets for a hashtag. I can get the results I’m looking but not live and I’m not sure polling is the best way to do this.

Is there any way to setup a callback from twitter to a script for a given hashtag ?
If not, that’s the best way to handle this ?

Thank you,

P.S. The advanced search options are really cool


You will have to use the streaming API. If I remember correctly you connect with a set of parameters and you get a constant stream as and when relevant tweets are posted.


Thank you for pointing me this way.

So calling POST statuses / filter and passing the hashtag I want to follow should be way forward, right ?

I’ve started testing using the rest console and although I set a value for the track parameter initially I got a warning mentioning no filters are specified, but when I tried again I got status 420 (good one :stuck_out_tongue: btw) “Exceeded connection limit for user”

What’s the recommended way of using the API ? (or how to I avoid exceeding the limit) ?

Thank you,