I get failure when persisting data with "OWNER" which is documented in
the open social documentation for it.
Since you can't store AppData as OWNER you will never be able to
retrieve as an OWNER

How am I supposed to persist my per use configuration? I'm not doing
it on my server, no without the
serverside APIs and authentication.

Clayton

On Nov 6, 10:02 pm, Mike <[EMAIL PROTECTED]> wrote:
> Have you been able to get this working? I am able to make the
> newFetchPersonAppDataRequest request using "VIEWER" but it always
> fails in the callback when using "OWNER" with null returned for
>
> var owner = data.get("owner").getData();
>
> ???
>
> On Nov 6, 9:55 am, Clayton Scott <[EMAIL PROTECTED]> wrote:
>
> > Am I handling the response object correctly? Does this work in the
> > Orkut sandbox?
>
> > In my gadget I have a required UserPref whose value is used when
> > rendering the profile view. My issue is that when I view a friends
> > profile, _my_ preference is used instead
> > of
> > When browsing as a VISITOR, I need the
> > OWNERs pref so that I can render the data from the right point of
> > view.
>
> > The pref is not set via the API it is set via the "edit settings"
> > feature in
> > Orkut.
>
> > When I try to fetch the userpref data, there are no keys in that sub-
> > response
> > object, just the top level key in main response.
>
> > Sample code:
>
> > My user pref is called tweb_uid.
>
> > <UserPref name='tweb_uid' display_name='Your Id' datatype='string'
> > required='true' />
>
> > Here is my javascript for accessing it:
>
> > <script>
> > function getOwnerData() {
> >   var req = opensocial.newDataRequest();
> >   req.add(req.newFetchPersonRequest("OWNER"), "owner");
> >   req.add(req.newFetchPersonAppDataRequest("OWNER", "tweb_uid"),
> > "owner_data");
> >   req.send(handleResponse);
>
> > }
>
> > function handleResponse(data) {
> >   var owner      = data.get("owner").getData();
> >   var owner_data = data.get("owner_data")
> >   if (owner_data.hadError()) {
> >     //Handle error using owner_data.getError()...
> >     alert( "Error: " + owner_data.getError);
> >     return;
> >   }
>
> >   var owner_data1 = owner_data.getData()[owner.getId()];
>
> >   alert( "ID: " + owner_data1["tweb_uid"] );
>
> > }
>
> > document.body.onload =  getOwnerData();
>
> > </script>


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"OpenSocial Developers" group.
To post to this group, send email to opensocial-api@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/opensocial-api?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to