i can fetch books by this code but why similarly i can't fetch
gender... please help to solve my problem i do need to fetch gender if
possible can u give me the similar code to fetch gender...

var params = {};
params[opensocial.DataRequest.PeopleRequestFields.PROFILE_DETAILS] =
  [ opensocial.Person.Field.BOOKS ];

var req = opensocial.newDataRequest();
req.add(req.newFetchPersonRequest(opensocial.IdSpec.PersonId.OWNER,
params), 'owner');
req.send(fetchPersonHandler);

function fetchPersonHandler(resp) {
  var ownerResp = resp.get('owner');

 if (!ownerResp.hadError()) {
    var owner = ownerResp.getData();

    // Use the opensocial.Person class' getField() method to access
specially requested fields
    output(owner.getField(opensocial.Person.Field.BOOKS));
  }
};


this code is not working why?

var params = {};
params[opensocial.DataRequest.PeopleRequestFields.PROFILE_DETAILS] =
  [ opensocial.Person.Field.GENDER];

var req = opensocial.newDataRequest();
req.add(req.newFetchPersonRequest(opensocial.IdSpec.PersonId.OWNER,
'''params'''), 'owner');
req.send(fetchPersonHandler);

function fetchPersonHandler(resp) {
  var ownerResp = resp.get('owner');

 if (!ownerResp.hadError()) {
    var owner = ownerResp.getData();

    // Use the opensocial.Person class' getField() method to access
specially requested fields
    output(owner.getField(opensocial.Person.Field.GENDER));
  }
};

-- 
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.

Reply via email to