TwitterLove: Applying the Social Graph API

Want to visualize someone's "following" list on Twitter? Thanks to this creative application of the Google Social Graph API you can. Even though Social Graph API was just released a couple weeks ago it didn't take long before creative developers began seeing ways to put it to use. And as you can see in our TwitterLove profile the application uses 2 other APIs including the Twitter API to create a timeline and the Japanese service to create thumbnails.

For a bit of insight into traversing through the social graph, developer Ko-Ji described to us his application flow using his own id of 'fkoji' as the example user to lookup:

1. Send an initial request to with arguments Callback=loop&q=fkoji&edo=1
2. In the callback we look for "types" in any "node_referenced" nodes returned (where "types" are "me" or "contact").
3. If type is "me", then we have a starting point URL for this person.
4. If type is "contact", then we push the node to a contacts array.
5. If contacts array is not empty, then we send a request to social graph api again with a query of contacts twitter urls.
6. In the callback we do the same process as above and if we find "fkoji" in their contact, we know they are contacts of each other, so we put a heart icon.
7. We use the service to get their thumbnail images.

You can also get more details doing a View Source on the TwitterLove HTML.

Update: In the comments ReadWriteWeb's Marshall Kirkpatrick points to a very slick mashup from Kent Brewster: BlogJuice. It uses the brand new MyBlogLog API and a variety of other services and tools (like Yahoo! Pipes) and "looks for a MyBlogLog identifier on the page you're on, and uses the MyBlogLog API to dig out information about its reader roll". Read Kent's post for lots of details with a live example with his own site, and see Marshall's coverage here.

Be sure to read the next Mashups article: New Mashups via Pownce, Twitter, Technorati