Tuesday, March 23, 2010

How to : Include your Google Profile Badge on any site

The code snippet explains how you can embed your Google Profile Badge (Profile card) on your site or any website.


The Google Profile Badge


You can view your Google profile badge (Profile card) using this URL pattern :


http://www.google.com/s2/widgets/ProfileCard?uid=XXXXXXX
Here XXXXXXX should be your unique user profile ID. This ID is the last parameter of your Google Profile URL. This means that if your GProfile’s URL is http://www.google.com/profiles/XYZ — your ID is XYZ. Similarly, if your GProfile’s URL is http://www.google.com/profiles/nishikant.kotgire — your unique user profile ID is nishikant.kotgire.


In the above cases, you can access your profile badge using the following URLs :


http://www.google.com/s2/widgets/ProfileCard?uid=XYZ


http://www.google.com/s2/widgets/ProfileCard?uid=nishikant.kotgire


To embed this badge on any webpage, you need to use iframe tags. Here is a sample code to embed the Google profile badge on any webpage :
<iframe src ="http://www.google.com/s2/widgets/ProfileCard?uid=nishikant.kotgire"  <p>Your browser does not support iframes. </p></iframe>




0 comments: