SAMUEL CHANDRA

Twitter Timeline and Facebook Pages Feed Aggregator with Ruby

Wednesday, 7th March 2012

A Common feature that was asked by clients is to display their Twitter and Facebook posts in a nice UI inside their iOS App.

You could do this using ObjC in the app OR use a server side component to aggregate them first and sort them by time in descending order. Latest on top.

I think doing it in ObjC is a lot of work. You can use MGTwitterEngine and Facebook Connect APIs to get the feed, place them in a Feed Object and sort them.

So I choose the simpler way through a ruby script that is run from a cronjob to aggregate them as JSON which will be consumed by the app

Here is the code:

We can cache the result and the iOS app will not take a long time to fetch the data. Great


Test all assumptions, logs does not lie
Tuesday, 6th March 2012

Just stop and go to sleep
Saturday, 18th December 2010

Amazon EC2 amazing wonder
Saturday, 14th August 2010

Redmine on VPS is the best
Thursday, 15th July 2010

Pomodoro Me, An iphone app for procrastinator like me.
Tuesday, 16th March 2010

How much difference can DNS Servers speed be?
Tuesday, 12th January 2010

Iphone Idle Timer and Battery State
Thursday, 17th December 2009

Git Workflow Branching Goodness
Tuesday, 1st December 2009

Project Management and Bug Tracking Software is a hassle for single developer
Sunday, 29th November 2009