You can parse out the orkut uid from the PROFILE_URL field as shown in
the following snippet.
You can paste this code into the dev app
(
http://www.orkut.com/Main#Application.aspx?appId=291092957065)
and test it out:
function init() {
var request = opensocial.newDataRequest();
var params = {};
params[opensocial.DataRequest.PeopleRequestFields.PROFILE_DETAILS] =
[opensocial.Person.Field.PROFILE_URL];
request.add(request.newFetchPersonRequest
(opensocial.IdSpec.PersonId.OWNER, params), 'owner');
request.send(processResponse);
}
function processResponse(data) {
var owner = data.get('owner').getData();
var profileUrl = owner.getField
(opensocial.Person.Field.PROFILE_URL);
var tokenizedUrl = profileUrl.split(/\?uid\=/);
if (tokenizedUrl.length == 2) {
var uid = tokenizedUrl[1];
output(uid);
}
else {
output("Error: user id not found");
}
}
init();