Hi,

  For your first question, you should try to request the GIVEN_NAME
field on the NAME field of a Person object.  Here's some code that
does this:

function response(data) {
  var owner = data.get("req").getData();
  var name = owner.getField(opensocial.Person.Field.NAME);
  var givenname = name.getField(opensocial.Name.Field.GIVEN_NAME);
  alert(givenname);
};

function request() {
  var req = opensocial.newDataRequest();
  var spec = opensocial.newIdSpec(
      {"userId" : "OWNER", "groupId" : "FRIENDS"});
  var params = {};
  params[opensocial.DataRequest.PeopleRequestFields.PROFILE_DETAILS] =
[
    opensocial.Person.Field.NAME
  ];

  req.add(req.newFetchPersonRequest(
      opensocial.IdSpec.PersonId.OWNER, params), "req");
  req.send(response);
};
request();


As for the application ID, there's not a standard way to get this in a
Javascript call.  I'll bring it up on the spec discussion group.
However, if you make a signed request back to your server,
opensocial_application_id is passed as a signed parameter, which will
contain the ID number of your application.

Hope this helps,
~Arne


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"OpenSocial Application Development" group.
To post to this group, send email to opensocial-api@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-api?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to