Hello.
I want to get the email of the person who uses my application.
I trying the flowing code but i not sure if that it is possible. As
far i can see on the documentation it is possible to get an array of
the user emails using the opensocial.Person.Field.EMAILS,
but the result is "undefined".
Any help our tip?
CODE:
function request()
{
var req = opensocial.newDataRequest();
var req = opensocial.newDataRequest();
var opt_params = {};
opt_params[opensocial.DataRequest.PeopleRequestFields.PROFILE_DETAILS]
=[opensocial.Person.Field.EMAILS];
req.add(req.newFetchPersonRequest('OWNER',opt_params), 'owner');
req.add(req.newFetchPersonRequest("OWNER"), "owner");
req.send(response);
};
function response(dataResponse)
{
var owner = dataResponse.get('owner').getData();
var myInfo= [owner.getId(), owner.getDisplayName()];
var emails = owner.getField(opensocial.Person.Field.EMAILS)
alert (emails);
getMovieName('flashObj').sendToActionScript(myInfo);
};
Thanks
--
You received this message because you are subscribed to the Google Groups
"OpenSocial Application Development" 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-api?hl=en.