I pasted your sample code in the Developer Application for OpenSocial
(http://prod.sandbox.orkut.com/Main#AppInfo.aspx?appId=845795770537)
running in prod.sandbox and changed your code slightly to output uid
if result.length==2 and the ID is displayed as expected. Try fetching
OWNER data instead of VIEWER and see if that makes a difference. Basic
user information including ID, name, and profile URL, is not available
if the user in question doesn't have the application installed, but
these fields should always be available for the owner.

Here's my change:
if (result.length == 2) {
  var uid = result[1];
  /* uid now contains the viewer's orkut UID */
  output(uid);
}

PROFILE_URL was never returning undefined in prod.sandbox, and the bug
in sandbox.orkut.com was fixed a couple of days ago, although you may
need to clear your browser's cache in order to get the refreshed
JavaScript.

- Jason

On Oct 13, 8:22 pm, sharath <[EMAIL PROTECTED]> wrote:
> Hi Jason,
>
> Even at prod.sandbox.orkut.com its showing  orkut user id as
> undefined.
> Kindly check it soon and let me know the solution
>
> Thanks
> Sharath
>
> On Oct 14, 3:17 am, Jason <[EMAIL PROTECTED]> wrote:
>
> > Hi Sharath. The PROFILE_URL field is currently returning undefined in
> > the sandbox. This is a temporary issue which should be resolved
> > shortly. In the meantime, your code should work in the more stable
> > testing environment athttp://prod.sandbox.orkut.com. Note that you
> > can only run OpenSocial v0.7 apps in prod sandbox.
>
> > - Jason
>
> > On Oct 13, 7:06 am, sharath <[EMAIL PROTECTED]> wrote:
>
> > > Hello,
>
> > > I am using the below code to get the user orkut it, but its showing
> > > the id as undefined.
>
> > > --------------------------------------------------------------------------
> > >  function request() {
> > > var params = {};
> > > params[opensocial.DataRequest.PeopleRequestFields.PROFILE_DETAILS] =
> > > [opensocial.Person.Field.PROFILE_URL];
>
> > > var req = opensocial.newDataRequest();
> > > req.add(req.newFetchPersonRequest("VIEWER", params), "viewer");
> > > req.send(response);};
>
> > > function response(data) {
> > > var viewer = data.get("viewer").getData();
> > > var profile_url =
> > > viewer.getField(opensocial.Person.Field.PROFILE_URL);
> > > var regex = /uid=([^&#]+)/;
> > > var result = profile_url.match(regex);
> > > if (result.length == 2) {
> > > var uid = result[1];
> > > /* uid now contains the viewer's orkut UID */} else {
>
> > > alert('there was a problem getting the UID');
> > > /* there was a problem getting the UID */}
> > > };
>
> > > request();
> > > ----------------------------------------------------------
>
> > > I also went through this post but did not get any 
> > > solutionhttp://groups.google.com/group/opensocial-orkut/browse_thread/thread/...
>
> > > Kindly let me know some solution.
>
> > > Thanks
> > > Sharath
--~--~---------~--~----~------------~-------~--~----~
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-orkut@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-orkut?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to