Social Media Plugins

The last week or so I have been fairly quiet, but I assure you that I am working on something fairly cool. Like most web developers, I have an online presence through many social media sites including Twitter, GitHub, and Facebook. What I am attempting to do is unify those feeds into one location feed for my homepage.

One of the issues I am facing is the the different APIs for each of these sites. Twitter information feed is very different than Facebook's and so forth. So my task has been to write a wrapper for all these different feeds that when I call to my service, I get a similar data structure each time.

var _socialMediaService = new services.socialMedia();

// _socialMediaService should return an array for both feeds
var _facebookFeed = _socialMediaService.getFacebookFeed();  
var _twitterFeed = _socialMediaService.getTwitterFeed();  

By default the individual libraries I am using will return an array for Twitter, and a structure for Facebook. In the facebook structure is a path the array of the actual feed array I want to use, so I simply return that feed instead of the entire structure. This allows for things to be a little more uniform in what I am expecting to have returned as result of calling these methods. Another thought would be to standardize the post data structure itself between facebook and twitter's returns, making my displays much simple to write.

I am almost complete phase one of this process, just working out some additional authentication issues. I am really excited to show this off, check back soon.