4 ms·
I've open sourced the code here http://github.com/godavemon/TwitTornado http://github.com/godavemon/TwitTornado A bit more about TwitTornado http://twittorna
by thingsilearned 17y ago
I've open sourced the code here
http://github.com/godavemon/TwitTornado http://github.com/godavemon/TwitTornado
A bit more about TwitTornado
http://twittornado.com/about http://twittornado.com/about
It was a fun and short project. I highly recommend Tornado to anyone needing a push framework.
- deleted 17y ago[deleted]
- adriand 17y agoThis is great! For me, the best thing about it is that it actually allows me to tweet, a feature that has not worked for me on the Twitter website for several weeks. It is nice to be able to tweet from a browser again.
- paul 17y agoYou should be able to get near-instant updates by using Twitter's streaming API: http://apiwiki.twitter.com/Streaming-API-Documentation#statuses/filter http://apiwiki.twitter.com/Streaming-API-Documentation#statu... I just updated Tornado's httpclient to include a streaming_callback parameter which allows you to process data as it arrives (the param was somehow lost when httpclient was extracted from the FriendFeed code). To use it, just do something like: http_client.fetch("http://stream.twitter.com/1/statuses/filter.json?follow=IDS..., cb, streaming_callback=self._handle_data, auth_username=...) def _handle_data(self, data): lines = (self.prev_linepart + data).split("\n") self.prev_linepart = lines[-1] lines = lines[:-1] if not lines: return for t in lines: try: tweet = tornado.escape.json_decode(t)
- thingsilearned 17y agoAwesome! I'll try to integrate this soon.
- vimalg2 17y agoTIP: The official tornadoweb.com link is incorrect. I believe it should be http://www.tornadoweb.org/ http://www.tornadoweb.org/