Want to include Google Calendar events in your app? How about letting users interact with Blogger, Picasa, or YouTube? You can do all this and more by integrating with the Google data (GData) APIs. There is even a JavaScript client library so you can access Google data directly from your OpenSocial app.
I've been working on an OpenSocial application that integrates with the Google Calendar data API, but when I tried to create a calendar event I encountered an interesting problem: How can I access authorized resources from an application that lives inside a container? If you've used GData before, you're probably aware that some features of the APIs require authentication using AuthSub, which doesn't quite work when your app is hosted in an IFrame inside an OpenSocial container.
I've collected information on Google Accounts APIs, Google Data APIs, and OpenSocial in this article explaining my solution so you can integrate with GData, too.
To see what else I've been up to lately, check out my personal blog
Happy coding!

4 comments:
Igncio,
Thanks for the authSub article. It helped clarify an issue I had just run into.
One small question. You mention the OpenSocial persistence API to save app state before requesting the token. But don't you need a token to save state with the OpenSocial persistence API?
The Persistence Data API Developer's Guide states that you do.
am I missing something?
thanks,
Mike
Hi Mike!
I think you did not read the correct Developer's Guide page.
For Persistence API you should read http://code.google.com/apis/opensocial/docs/0.7/devguide.html#Persistent
Regards,
Ignacio
ah, I see. Persistent data in the OpenSocial API and not the OpenSocial Persistence data API. ...I love for this stuff :)
Thanks for clearing that up, Ignacio!
There's also this article:
http://code.google.com/apis/gdata/articles/gdata_gadgets.html
if anyone is interested in Google Data API gadgets. The token flow with iGoogle's OAuth Proxy is an improvement.
Post a Comment