Playing with the MyBlogLog API

So, the initial glitches in getting me going with the MyBlogLog API have been resolved and I started kicking the tires with it. My initial efforts were to see who I have friended in MyBlogLog, and then checking to see if I am their friend on other Social Networks they’ve identified themselves as being part of.

I could do this by clicking on each friend in MyBlogLog, then clicking on each service that they have listed, and then finding the ‘add as friend’ link. Or, I could write a program that would list all of my friends, all of the services they’ve signed up for, and provide a link to the easiest place to add them as a friend.

It has been a fun exercise. I have 55 friends on MyBlogLog. Between them, they have listed 184 different services that they use. Not all of the services provide pages where you can add someone as a friend, and I’m still doing a bit of debugging, but so far, I’ve added a bunch of friends on a bunch of different systems. If you’ve gotten a message from me about adding you to one service or another, that is the reason.

Of my MyBlogLog friends, fifteen have identified themselves as using Twitter. It may be that more people are identifying their Twitter accounts, because MyBlogLog will add your latest tweat to your MyBlogLog profile page. I also believe that you could add Twitter information before you could add other service information.

Twelve have listed their Flickr accounts. Since Flickr and MyBlogLog are both Yahoo! services, I don’t find this too surprising either. Tied for second place, also with 12 people is LinkedIn. I haven’t gone through the LinkedIn pages to add my friends from MyBlogLog to LinkedIn. I’ve always found the LinkedIn interface frustratingly kludgy.

Eight of my MyBlogLog contacts use Five use digg, Facebook, Second Life, Technorati, and upcoming. Four use MySpace and Youtube.

In terms of the nuts and bolts, I used PHP to process the data. Specifically, I used the file_get_contents function in PHP to retrieve the data from MyBlogLog in serialized php format. I then used the unserialize function to throw it into arrays, threw in some logic and started producing my pages. The biggest problem was adding the code to go to the right page to add people as friends on various systems.

The only complaint I’ve found so far is a slight inconsistency of the data returned. If a user has defined multiple services, then services is an array with each entry in the array being the definition of the service. However, if there is only one service, the array ends up being the components defining that one service. It is easy to code around, but if they were a little more consistent, it would eliminate some extra code.

Another concern that I have is how Yahoo limits the number of webservice calls that are made. Any IP address can make 5000 webservice calls a day. To the extent that the calls are being made on the client side, such as through Javascript, that is more than enough. It is even probably more than enough for me when I’m developing. Right now, I’m making a call for each friend, and I’ve done that quite a few times as I’ve tested my program, but I don’t think I’ve come close to my 5000 calls. However, if I try to embed this into the PHP code of a Drupal site (like my blog), I expect my usage could easily exceed the daily limit. There may be ways around that, but it is a minor concern of mine right now.

Now that I feel comfortable extracting data from MyBlogLog, I will look at creating graphs of various sets of users of MyBlogLog, similar to what I did a long time ago before the MyBlogLog API was available. Sometime, when I have more time, I may check out mashing up several of the APIs to graph things like Flickr and MyBlogLog overlaps or adding the location of my friends on MyBlogLog onto a map.