Hi Vijay,
Try to use code debugger application. It will help you to see what
output you are getting exactly. I assume viewer is friend of
application owner. Sometimes it gives error for visitor who is not
having any relation with application owner, I am not sure though.
Check if your code is not giving any JS error.
Thanks,
Pravin
On May 23, 6:59 pm, "John Ruffin" <[EMAIL PROTECTED]>
wrote:
> I believe you have to make a request for the owner data (e.g.
> data.get('owner').getData(); ). Additionally, you probably want to use single
> quotes.
>
> Hope this helps,
>
> John Ruffin
>
> -----Original Message-----
> From: Vijay Gaur [mailto:[EMAIL PROTECTED]
> Sent: Friday, May 23, 2008 08:34 AM
> To: [email protected]
> Subject: [orkut-developer] Need help - very basic question
>
> Hi,
> I am trying to access owner and visitors user ids along with view name
> (canvas/profile). However when I check the link the uid and viewName in query
> string are coming as null.
>
> I was testing my application on Orkut sandbox and used the code below.
> Appreciate any help.
>
> function request() {
> var req=opensocial.newDataRequest();
> req.add(req.newFetchPersonRequest("VIEWER"), "viewer");
> req.send(response);
> };
> function response(data) {
> var viewer = data.get("viewer").getData();
> var uid = viewer.getId();
> var viewName=gadgets.views.getCurrentView().getName();
> document.getElementById('test').src='http://localhost/test.aspx?uid='+uid+'&viewName='+viewName;
> };
>
> --
> Regards,
> Vijay Gaur
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Orkut 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/opensocial-orkut?hl=en
-~----------~----~----~----~------~----~------~--~---