[orkut-developer] Re: Unable to access persistent app data from Orkut

2010-11-03 Thread DevenH
Now that i've switched over from sandbox.orkut.com over to
prod.sandbox.orkut.com I am no longer able to access my persistent data
again. Here is the object that is being returned to me when I try to
get all fields:

({responseItems_:{fooKey:{originalDataRequest_:{rpc:{method:"appdata.get",
params:{userId:["@viewer"], groupId:"@self", appId:"@app", fields:[]},
id:"fooKey"}, processData:(function (F) {return
opensocial.Container.escape(F, C, true);}), processResponse:(function
(C, F, E, D) {var G = E ? JsonRpcContainer.translateHttpError(E.code) :
null;return new (opensocial.ResponseItem)(C, E ? null :
this.processData(F), G, D);})}, data_:null, errorCode_:"unauthorized",
errorMessage_:(void 0)}}, globalError_:true, errorMessage_:(void 0)})

Notice there is an error code: "unauthorized"why am I unauthorized
if I am the owner and viewer of the app and the app is trying to get my
data??

-- 
You received this message because you are subscribed to the Google Groups 
"orkut Developer Forum" group.
To post to this group, send email to opensocial-or...@googlegroups.com.
To unsubscribe from this group, send email to 
opensocial-orkut+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/opensocial-orkut?hl=en.



[orkut-developer] Re: Unable to access persistent app data from Orkut

2010-10-14 Thread DevenH
I finally figured it out! It was an extremely frustrating task because
all the documentation was wrong...but here is what I found worked for
me to access the persistent app data for the user (Viewer):

when setting the data i did this:
req.add(req.newUpdatePersonAppDataRequest("VIEWER", data, "foo"));

NOTE: the second param is actually the one where you have to put your
data!! in fact, the last param, "foo" doesn't really do anything, just
put any string there. When i tried removing the third param all
together the request did not work, so make sure to put some value
there.

When accessing your app data do the following:
var fields = "*";
req.add(req.newFetchPersonAppDataRequest(viewer, fields), 'dataKey');
req.send(callbackAfterGettingData);
NOTE: for the fields I simply used an asterick to tell orkut to return
all fields for the user's app data.

In your callback function do the following:

stringData = data.get('dataKey').getData()[me.getId()]["VIEWER"];
userAppData =
gadgets.json.parse(gadgets.util.unescapeString(stringData));

NOTE: use the 'dataKey' you specified in your earlier function, then
use the user's open social id to access their app data and finally ALL
of the user's data is stored in an object property called "VIEWER".
Once you access the VIEWER property you will get back all the data you
stored!


I hope this saves someone else loads of time!

(btw, the steps above are for Orkut using OpenSocial API v0.8)

On Oct 13, 2:26 pm, anatoly  wrote:
> same here, persistent data doesn't work on profile view
>
> please check it out
>
> On Oct 13, 9:16 pm, sunnydiv  wrote:
>
> > my app is not picking up 'persistent data'
> > in PROFILE VIEW in production,
>
> > but picking it up
> > in PROFILE VIEW in sandbox
>
> > as always, i guess it will take 2 weeks for orkut team to pick this
> > issue up,
> > and then 2 weeks to fix it.
>
> > i am just beyond disappointed
>
> > On Oct 11, 7:28 pm, DevenH  wrote:
>
> > > Here is a link to the test version of the app:
>
> > >http://fb.peixeurbano.com.br/orkut/top-flavors-of-rio.xml
>
> > > you can find the external js here:
>
> > >http://fb.peixeurbano.com.br/orkut/js/common.js
>
> > > thanks!- Hide quoted text -
>
> > - Show quoted text -

-- 
You received this message because you are subscribed to the Google Groups 
"orkut Developer Forum" group.
To post to this group, send email to opensocial-or...@googlegroups.com.
To unsubscribe from this group, send email to 
opensocial-orkut+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/opensocial-orkut?hl=en.



[orkut-developer] Re: Unable to access persistent app data from Orkut

2010-10-13 Thread anatoly
same here, persistent data doesn't work on profile view

please check it out

On Oct 13, 9:16 pm, sunnydiv  wrote:
> my app is not picking up 'persistent data'
> in PROFILE VIEW in production,
>
> but picking it up
> in PROFILE VIEW in sandbox
>
> as always, i guess it will take 2 weeks for orkut team to pick this
> issue up,
> and then 2 weeks to fix it.
>
> i am just beyond disappointed
>
> On Oct 11, 7:28 pm, DevenH  wrote:
>
>
>
> > Here is a link to the test version of the app:
>
> >http://fb.peixeurbano.com.br/orkut/top-flavors-of-rio.xml
>
> > you can find the external js here:
>
> >http://fb.peixeurbano.com.br/orkut/js/common.js
>
> > thanks!- Hide quoted text -
>
> - Show quoted text -

-- 
You received this message because you are subscribed to the Google Groups 
"orkut Developer Forum" group.
To post to this group, send email to opensocial-or...@googlegroups.com.
To unsubscribe from this group, send email to 
opensocial-orkut+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/opensocial-orkut?hl=en.



[orkut-developer] Re: Unable to access persistent app data from Orkut

2010-10-13 Thread sunnydiv
my app is not picking up 'persistent data'
in PROFILE VIEW in production,

but picking it up
in PROFILE VIEW in sandbox





as always, i guess it will take 2 weeks for orkut team to pick this
issue up,
and then 2 weeks to fix it.

i am just beyond disappointed



On Oct 11, 7:28 pm, DevenH  wrote:
> Here is a link to the test version of the app:
>
> http://fb.peixeurbano.com.br/orkut/top-flavors-of-rio.xml
>
> you can find the external js here:
>
> http://fb.peixeurbano.com.br/orkut/js/common.js
>
> thanks!

-- 
You received this message because you are subscribed to the Google Groups 
"orkut Developer Forum" group.
To post to this group, send email to opensocial-or...@googlegroups.com.
To unsubscribe from this group, send email to 
opensocial-orkut+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/opensocial-orkut?hl=en.



[orkut-developer] Re: Unable to access persistent app data from Orkut

2010-10-11 Thread DevenH
Here is a link to the test version of the app:

http://fb.peixeurbano.com.br/orkut/top-flavors-of-rio.xml

you can find the external js here:

http://fb.peixeurbano.com.br/orkut/js/common.js

thanks!

-- 
You received this message because you are subscribed to the Google Groups 
"orkut Developer Forum" group.
To post to this group, send email to opensocial-or...@googlegroups.com.
To unsubscribe from this group, send email to 
opensocial-orkut+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/opensocial-orkut?hl=en.



[orkut-developer] Re: Unable to access persistent app data from Orkut

2010-10-10 Thread DevenH
Sometimes I get the error above, while other times I simply get back an
empty object:

({ })

Surely, someone else must be hitting this issue too. If so, please add
to this thread so that we can get to the bottom of this. i'm stumped.

-- 
You received this message because you are subscribed to the Google Groups 
"orkut Developer Forum" group.
To post to this group, send email to opensocial-or...@googlegroups.com.
To unsubscribe from this group, send email to 
opensocial-orkut+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/opensocial-orkut?hl=en.



[orkut-developer] Re: Unable to access persistent app data from Orkut

2010-10-10 Thread DevenH
In the callback after I make the call to newFetchPersonAppDataRequest
here is the null data I get back with the "unauthorized" errorCode:

({originalDataRequest_:{rpc:{method:"appdata.get",
params:{userId:["@viewer"], groupId:"@self", appId:"@app",
fields:["foo"]}, id:"fooKey"}, processData:(function (F) {return
opensocial.Container.escape(F, C, true);}), processResponse:(function
(C, F, E, D) {var G = E ? JsonRpcContainer.translateHttpError(E.code) :
null;return new (opensocial.ResponseItem)(C, E ? null :
this.processData(F), G, D);})}, data_:null, errorCode_:"unauthorized",
errorMessage_:(void 0)})

Does anybody have any ideas why I'm getting this back instead of the
persistent data for the user?

Thanks for your help!

-- 
You received this message because you are subscribed to the Google Groups 
"orkut Developer Forum" group.
To post to this group, send email to opensocial-or...@googlegroups.com.
To unsubscribe from this group, send email to 
opensocial-orkut+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/opensocial-orkut?hl=en.