thematic.me Blog

RSS
Jun 1

Instagram photos in real time!

image

Kaleidoscope, an experiment by the Thematic.me team, displays Instagram photos as they are taken on Twitter.  You can download the source code here.

How It Works

Kaleidoscope listens to Twitter to see if there are any public Instagram photos being posted.  We think real-time photos can change the way we see the world, or at least give us a different perspective. It uses node.js, WebSockets (socket.io), jQuery, and the Instagram and Twitter APIs. 

Although Instagram provides a real-time API, you can only search for photos by a specific tag, user, geography or region. As far as I know, there isn’t an API to capture everything posted to Twitter.  Therefore, in order for our app to work we have to make an API request for every photo posted, which can be up to 5 requests per second.  Obviously this isn’t the best design decision, but it’s a constraint that we have to work around. Hopefully Instagram will release a streaming API much like Twitter has in the future.

Future Plans

If there’s enough interest, we think it would be cool to filter by a certain keyword. Imagine being able to view all the photos of an event as they happen. You can see all those photos being posted from a concert, conference, or major political event in real time. 

We are hoping to integrate other photo services such as TwitPic or yFrog. TwitPic’s API is very limited. There isn’t a way to grab the entire photo - you can only get a thumbnail. Scraping the image would be against their TOS. Please correct me if I’m wrong. 

About Us

Kaleidoscope was designed and developed by us, Chris (@heeyitschris) and Calvin (@cghan).  We primarily work on Thematic.me, but like to hack on side projects a lot in Python/Django.  If you would like a custom version of Kaleidoscope for you (maybe to use at an event), feel free to contact us.