Hi All,
 
With the help from Viveka, the link which he provided for a tutorial for 
developing applications for Social Sites, Im able to get many things which was 
not so clear at my early stages. But I'm having some troubles as Im trying out 
the scripts given there. Here is the one:
 
<?xml version="1.0" encoding="UTF-8" ?>
<Module>
 <ModulePrefs title="Owners Details Example">
   <Require feature="opensocial-0.7"/>
 </ModulePrefs>
 <Content type="html">
 <![CDATA[
<script type="text/javascript">
 
function getOwnerData() {
var params = {};
params[opensocial.DataRequest.PeopleRequestFields.PROFILE_DETAILS] =
[opensocial.Person.Field.AGE];
 
var req = opensocial.newDataRequest();

req.add(req.newFetchPersonRequest(opensocial.DataRequest.PersonId.OWNER, 
params), 'owner');

req.send(fetchPersonHandler);
};

function fetchPersonHandler(resp) {
  if (!resp.hadError()) {
    var owner = resp.get('owner').getData();
   
// Use the opensocial.Person class' getField() method to access specially 
requested fields

 var result = owner.getField(opensocial.Person.Field.AGE);

 alert(result);
  }
};
</script>

  <button onClick="getOwnerData()">Fetch Owner Details from orkut.com</button> 
  
  ]]>
  </Content>
</Module>
 
When Im running the above, it prints "null" in the alert box!!!!!! whereas the 
required output should be the AGE.
 
I've followed the static class opensocial.person.field which includes all the 
properties. This specifys the AGE property to return  <static> object AGE. As 
it is returning an OBJECT, which could be null at runtime, in my case, then how 
to know whether any value is set for the questioned property and how to print 
that.
 
Thanks in advance.
 
Javed Iqbal


      
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Implementing OpenSocial Containers" 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-container?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to