Tuesday, August 30, 2011

Google profile cards

I feel I need to blog here more (I feel bad seeing this blog so empty), so to start I'm going to reveal something that I've been thinking about for a while.

Google profile cards!

These things are actually official, Google uses them in many of their products like Google Books, Google Reader, and even when you hover over names on the new Google Groups. It automatically displays some information from your Google Profile and even says if you're verified or not (though I'm not sure if that's the verified feature from Google+, Google Knol or both), and if the user viewing the card happens to be your friend on Google Talk, your GTalk status shows up there too.

So this trick doesn't require some ridiculous hack or use of any API, just an iframe.

The code looks like this:

<iframe frameborder="no" align="center" src="http://www.google.com/s2/u/0/widgets/ProfileCard?uid=[[LALALA]]" style="width: 325px; height: 122px; border: none;" width="325px" height="122px"></iframe>

and all you have to do is replace where it says "[[LALALA]]" with your Google profile UID (in your URL it's the number or screenname after "plus.google.com/" or "profiles.google.com/").

also, if you want to remove that border around your card (maybe to replace it with one of your own), just add "&bc=0" after your UID in the URL.

And there you have it. I'm sure someone will want to embed this on their blog somewhere or on their profile on some forum.
I'm surprised that Google hasn't officially pushed this out to be used by 3rd parties, it seems pretty complete for such a use case (somebody annoy someone at Google to make this official).