Tuesday, 24 February 2009

Are you in the sandbox? Here's a quick way to check

Can't figure out if your account is in the developer sandbox or not? Sometimes the "Welcome to the iGoogle Developer sandbox" message is obscured. Sometimes developers are confused about the behavior of the http://google.com/ig/sandbox page (which acts as a toggle, not just a redirect). And sometimes sandbox features aren't working properly, so that even if you are in the sandbox, it looks like you aren't.

Here's a small gadget to provide a little heads up on the sandbox status. If you're in the sandbox, it lets you know and gives you a quick way to leave. If you're not, it gives you a quick way to enter. And, finally, if it thinks you are in the sandbox, but features don't seem to be working, it tells you that, too. Think of it as your personal sandbox valet.

The exact behavior relies on the current rollout of features (and using the .com TLD), so it will likely need an update down the road as launches occur. Please test it, add it to your pages, and check the status message if things aren't working properly.

For questions and comments, feel free to add to this thread in the forum.

Friday, 23 January 2009

iGoogle's getting some changes under the hood

If you've had a chance to look at recent gadgets documentation, or tried out the iGoogle developer sandbox, you're probably aware that gadgets.* is the new hotness. Sadly, the _IG_* methods are all that work in production.

Starting within the next month, iGoogle will be undergoing some significant behind-the-scenes changes. The first recipients will be gadgets in open syndication, which will gain support for gadgets.*. We've worked hard to make sure gadgets work properly with the new architecture, and gadgets that use _IG_* methods should still function properly. However, there are two things that you, as a developer, should note.

First, support for datatype=location is now deprecated, and you should use another method, such as the Google Maps API geocoder, for positional data.

Second, iGoogle will dynamically rewrite some HTML and JavaScript for faster loading and rendering times. While this is generally a good thing, some malformed HTML and JavaScript can cause problems. Make sure to wrap your JavaScript code as demonstrated by the following example to avoid many common issues:

<script type="text/javascript">
<!--
// js code goes here...
// -->
</script>
As always, if you have issues, let us know in the iGoogle Developer Forum.

Wednesday, 14 January 2009

New ACLs on social features

Up until today, gadgets installed in the iGoogle developer sandbox had implicit access to social data, with no way for users to opt-out without uninstalling the gadget. We've added a feature to give more finely-grained control to users and allow users to explicitly grant or deny access to social data to their gadgets.

When users install gadgets that use social data (indicated by requiring the OpenSocial feature), they will be prompted to give permission to access social data. If a gadget is released without social features and is upgraded, users will be prompted for access within the gadget when the new version is first rendered.


When OpenSocial gadgets are available to all iGoogle users, users must grant permission before gadgets are allowed access to social data. For sandbox users, we want to ease development, so sandbox gadgets are allowed access to social data before confirmation.

Developers, this is important, so take note. If users deny access to social data, the gadget should have a good error message and graceful fallback UI.

Check for the ability to access social data with this snippet of code:

gadgets.util.hasFeature("opensocial-0.8")

and fall back gracefully if permission is not granted.

If you have any questions, please join us in the iGoogle Developer Forum.

Friday, 19 December 2008

REST and RPC support in the developer sandbox

If you've got Firebug installed on your iGoogle page, you may have noticed how requests to fetch people, friends, or persistent data are formatted. These requests follow the RPC specification that's part of OpenSocial, and, while they've been part of the sandbox for a few months now, never really deserved a mention, until today.

We've just released four client libraries (Java, PHP, Python, and Ruby) for using these REST and RPC requests as part of your own gadgets. With these libraries, you can access social data without having to go through an iGoogle page (for instance, if you need to do offline processing), or even write an application without having to write any JavaScript.

To get started, download the client of your choice and try the included samples, which work on a variety of OpenSocial containers. (For reference, the iGoogle endpoints are http://sandbox.gmodules.com/api for REST calls, and http://sandbox.gmodules.com/api/rpc for RPC calls.) When you're ready to do your own iGoogle development, register your application to get the authentication keys you'll need to use the API.

If you have questions or comments, join us in the OpenSocial client libraries group. Have a RESTful (and RPCful) holiday season!

Wednesday, 19 November 2008

Sign in to MySpace, AOL Mail, and Google Books gadgets

See your latest updates on MySpace, read and reply to messages in AOL Mail, and keep track of your Google Book Search Library.



These are the first three gadgets on iGoogle to use OAuth, which is a privacy-preserving security standard that defines how a user can give consent for their data on one website to be accessed by another website (or in this case a gadget). iGoogle never sees the user's password on the other site, and the gadget displays the user's data from the other site without storing any of it on Google's own servers (read more details about OAuth on our Security Blog). With these gadgets on iGoogle, users can now keep track of even more personalized information from across their online life. For example, the MySpace gadget shows your friends' latest updates, status messages, bulletins, and an inbox preview.

With the AOL Mail gadget, you can preview all your email messages in home view. In canvas view, read rich text email, compose, reply, delete, mark as spam, and more. The gadget even includes autocomplete, attachments, spell check, and sorting options. If you have an AOL Mail or AIM Mail account, you must try this gadget.

The Google Book Search Library gadget allows you to keep track of all the books you want to read, and also offers you personalized recommendations. Finding new books and removing books from your library is a snap. You can even preview your books from right within iGoogle's canvas view.

These gadgets are also great examples of how to utilize the canvas view, which launched last month on iGoogle. If you want to create a gadget like AOL and MySpace, this overview will get you started on exposing an API that can be accessed using OAuth. If you already know which OAuth enabled API you want to access, you can jump directly to the gadgets documentation.