In a previous post I added an example of how you can display your (or someone else's) lifestream data on your iGoogle page. But it's your data and you might actually want to show it on your site. As we write in other posts we are working frantically to give you access to as much of your own data as possible, but for now you can only get your profile data, lifestream and shouts.
In this post you see a basic example of how you can download your profile data and display it. The example comes in two parts. The widget.htm file shows the script tags you have to add to your page where you wan the profile information to be displayed. The only real thing to note here is that you should change the empty string in ZProfile.loadProfile(''); to whatever your profile name is. The page also defines the CSS style for the various display areas. We didn't want to define any styles for you, but that means it is your responsibility to make it look nice.
The real work is done in the profilewidget.js. This takes care of fetching the data from ZYB and writing it on your page. I won't go into the details of that here. If you know JavaScript then the code is straightforward (make a JavaScript on Demand request and write the HTML) and if you don't then you won't get anything out of it anyway.
When displaying your profile information on your own page, remember that some people who come to your page might not be ZYB users (yet!) and may therefore see less information than you or your ZYB connected friends see. You should therefore go and set the privacy settings according to the information you display.
In the future we do plan to host some widgets on this site so all you have to do is add the script tags to your own page, but we wanted to get your feedback while the development is still ongoing.
profilewidget.zip (1.38 kb)