This code is almost the same as that on http://code.google.com/apis/orkut/docs/orkutdevguide.html#ops_uid But it isn't working. Could someone tell me why?
function request() { var param = {}; param[opensocial.DataRequest.PeopleRequestFields.PROFILE_DETAILS] = [opensocial.Person.Field.PROFILE_URL]; var req=opensocial.newDataRequest(); req.add(req.newFetchPersonRequest("VIEWER"), "viewer"); req.send(response,param); }; 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]; alert(uid); /* uid now contains the viewer's orkut UID */ } else { /* there was a problem getting the UID */ } }; request(); } Thanks, Ankit. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---