Profile picture

Gareth Hughes Social Feed

Social Feed

22 December 2011

Social Feed So I felt like I wanted to have a play around with some new tech and I decided that would be Raven DB. I had an idea what I wanted to do, collect all my social feeds, Twitter, Facebook, Flickr, Diigo and something for gaming and show them on the side of this page.

APIs are available for Twitter/Facebook/Diigo/Flickr and these were relatively easy to work with. Some of the JSON returned was aimed at JSONP rather than server side consumption but I worked around it.

The gaming feed was slightly more of an issue. There are a few sites which collect data from Steam, Xbox live and PSN etc. The most notable being Playfire and Raptr, however neither site have any public API available though which is a huge shame. Steam also has really quite pathetic Web APIs available which are very little use.

The best solution I found was using Raptr. Raptr at least lets you auto tweet activities so I set up a Twitter account just for Raptr to tweet to and used that.

Technical Solution

Using Quartz.NET and a bit of reflection I created a Job for each feed that I want to collect and have them running every 10 minutes. I then use Newtonsoft Json to parse the results and throw them at Raven DB which is what I’m using for the data store for this feed.

Each job uses a WebClient and then calls DownloadStringAsync to download the result. A simple solution really.

And when loading the page I load the last 20 updates and throw them out on the page.

blog comments powered by Disqus

About Me

Software Developer from Sheffield, England with a first class degree in Software Engineering. Specialising in .NET, JavaScript and PHP.

This is my blog about random things, usually nerdy. I enjoy gaming, reading, music, football and cycling.

Search

Social Stream

Contact Me