Twitter Updates

Friday, November 02, 2007

My first Open Social widget running on Ning.com!

Finally!!!

I found out a way to add OS Widget to the OSDN network home page :)

Actually it had been more easier and obvious if Ning had somewhere said that Gadgets support Open Social API instead of saying "Open social is disabled by default and Network Creator has to enable it". Believe me I didn't have to.

In network's management panel I went to Features page and added Gadgets to the page.


Now, on the Network home page I edited the widget and added a title and the location of the hosted Gadget XML file.


The mentioned XML file has the code to list out the viewer's friend's taken from the Open Social API documentation at code.google.com

And I saved the gadget. This showed the "Requesting friends . . . " message and a error in the firebug console.
But the messages above the error message suggested that Open Social functions were available and I was retrieving my Name and Friends list. I set a break point in the retrieval method. This showed that there was an error in the code on Google API.

When you call a method like dataResponse.get('viewer') it will return you the required object. It doesn't have the getData() method and you don't need it. Just use dataResponse.get('viewer'). Same stands true for dataResponse.get('viewerFriends')

And then I refreshed the page. Voila!!!
You should be able to see the list of your friends in this gadget when you visit the OSDN home page.Definitely, Marc, this experience was better than the one with Plaxo and Orkut Sandbox (which refused to accept the changes we made to the widget, we had to remove the application and install it again)

One question though. How do I add more gadgets to the page???

7 comments:

Rohit said...

BTW, you can download the widget file from http://devilsown.99k.org/friends.xml

cheryl said...

weee.. it worked! hope to see more tutorials on this... i definitely love OpenSocial!

Anonymous said...

Very nice - I had previously followed Diego's instructions on adding various gadgets.

Anonymous said...

Very nice - I had previously followed Diego's instructions on adding various gadgets.

Mike said...

On the Orkut sandbox, if you append &bpc=1 to the page you are requesting that has the app on it, (such as the app page itself or the profiel page) the orkut caching will be bypassed and you won't have to keep removing and readding your app to see your changes while developing it.

Gadger said...

For sandbox &bpc=1 not always working. May be not using it correctly. For Ning changes are instant. Please check my profile (jevs) at http://webwidgets.ning.com/ for sample of OS app with friends and owner. For some reason pictures not shown. Cheers.

Timothy said...

Scores of people surf the internet on a daily basis looking for blogs on specific topics and if you are among them, you won’t be disappointed after landing up at Bloggersblaze, a website that provides you with a blog directory that is considered to be the largest and most comprehensive over the internet. You will surely find the blog you are looking for in our social blog directories and by coming in touch with bloggersblaze, you would be able to enhance your knowledge on blogging and also it would be possible for you to connect with bloggers worldwide.

Post a Comment

What I read . . .

 
ss_blog_claim=47174056018c98861ec00051ef8442aa