Hi,

I believe that UserPref support is optional for OpenSocial
compatibility, which is why UserPrefs doesn't work on orkut. It will
require a bit of extra work to have your gadget work in legacy API
containers and all OpenSocial containers, but here is what you can do.
First, require the opensocial-0.7 or opensocial-0.8 feature in your
gadget (I'm fairly sure that legacy iGoogle will just ignore the
request and not return an error). Next, check whether opensocial is
defined in your JavaScript. If it is, use the app data API in
OpenSocial to store your value, or alternatively, use the id of OWNER.
If opensocial is not defined, use _IG_Prefs as you do in legacy
iGoogle.

The non-OpenSocial containers will _IG_Prefs (since this is just
iGoogle), and the OpenSocial containers will use app data.

I hope this helps.

Best,
Dan

On Oct 6, 2:10 am, westor <[EMAIL PROTECTED]> wrote:
> Hi, I like to save one single value to recognize the current logged in
> user. I tryed to use _IG_Prefs() to save this value as a preference.
> This works fine for iGoogle and the old api.
>
> prefs = new _IG_Prefs();
> ...
> var e4aUser;
> if (prefs)
>   e4aUser = prefs.getString("e4aUser");
> else
>   e4aUser = 0;
> ....
> if (prefs && !e4aUser) {
>    // get a new e4aUser
>    ....
>    prefs.set("e4aUser", e4aUser);
>
> }
>
> But as I noticed it's not workingen eg. in the ORCUT developer
> sandbox.
> How should I write my program, so it is working in all versions of
> open social and the legacy API too? Is this possible?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"iGoogle Developer Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Gadgets-API?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to