Have a sound each new twitter hashtag, something more than a poll?

Hi guys, I’d like to develop a simple OF applications that plays a sound each time a new twitter messages with hashtag #foo is posted.

Is that a better way then continuously polling a twitter search on #foo and see if there are new results?

Plus, is there some needed of threading in this case? Like a thread for twitter-scraping?

1 Like

You should check out Roxlu’s ofxTwitterStream

I’m wondering how to use it and cannot find an example that would properly demonstrate. the example in the git I cannot get to work. what do I need to put here?
/1/statuses/filter.json?track=#photography” or “/1/statuses/filter.json?track=photography” if I’d be trying to fetch all tweets #photography?
also: is there a way to check if the twitter connection is working at all?

did you finally made it? I looking for this too

I’ve got twitter examples in ofxHTTP. It now includes OAuth, etc.

1 Like

Thanks! I tried your example some days ago, and also now, but I get an error (No matching constructor for initialization of ‘ofx::HTTP::GetRequest’) on the url:

// Choose a twitter end point.
std::string url = "https://api.twitter.com/1.1/search/tweets.json";


// Create a get request.
ofx::HTTP::GetRequest request(url, nvc);

Anyway, correct me if I am wrong… but after reading around I think the way to do what the topic of the post says, it’s better to use the API Stream mode, and not the search:

I am missing something?

I tried too the https://github.com/pelayomendez/ofxTwitter addon but when I make a search I get limited to list 100 tweets…

(If needed… do you think there is any way to “update” the ofxTwitterStream to make it work to 1.1 API?)