Hi to All

 i am right now using Latest PHP shindig and its working fine for me .

 i implemented my own Basicpeople.php instead of using default one .
 whenever i am running gadget ListFriends.xml ..

 i am getting all the responses in my firebug but still i am not
getting that values as gadget output .

in firebug its giving error like :

viewer has no properties
[Break on this error] var html = 'Friends of ' +
viewer.getDisplayName();

ListFriends.xml file
------------------------------------------------------
<?xml version="1.0" encoding="UTF-8" ?>
<Module>
 <ModulePrefs title="List Friends Example">
   <Require feature="opensocial-0.7"/>
 </ModulePrefs>
 <Content type="html">

 <![CDATA[

 <script type="text/javascript">

 /**
  * Request for friend information.
  */
  function getData() {
    var req = opensocial.newDataRequest();
 
req.add(req.newFetchPersonRequest(opensocial.DataRequest.PersonId.VIEWER),
'viewer');
 
req.add(req.newFetchPeopleRequest(opensocial.DataRequest.Group.VIEWER_FRIENDS),
'viewerFriends');
    req.send(onLoadFriends);
  };

 /**
  * Parses the response to the friend information request and
generates
  * html to list the friends along with their display name.
  *
  * @param {Object} dataResponse Friend information that was
requested.
  */
  function onLoadFriends(dataResponse) {
    var viewer = dataResponse.get('viewer').getData();
    var html = 'Friends of ' + viewer.getDisplayName();
    html += ':<br><ul>';
    var viewerFriends = dataResponse.get('viewerFriends').getData();
    viewerFriends.each(function(person) {
    html += '<li>' + person.getDisplayName() + '</li>';
    });
    html += '</ul>';
    document.getElementById('message').innerHTML = html;
  };

  gadgets.util.registerOnLoadHandler(getData);

  </script>
  <div id="message"> </div>
  ]]>
  </Content>
</Module>
--------------------------------------------------------------------------------------------------------
post:

{"viewer":{"url":"/people/@viewer/@self?
fields=id,name,thumbnailUrl&startIndex=0&count=20&orderBy=topFriends

&filterBy=all&networkDistance=","method":"GET"},"viewerFriends":
{"url":"/people/@viewer/@friends?fields

=id,name,thumbnailUrl&startIndex=0&count=20&orderBy=topFriends&filterBy=all&networkDistance=","method"

:"GET"}}
--------------------------------------------------------------------------------------------------------
RESPONSE:

{"responses":{"viewer":{"response":{"6":{"aboutMe":"Its all abt the
fact :-)","dateOfBirth":"1985-11-22"

,"id":"6","name":
{"unstructured":"ak47"},"isOwner":false,"isViewer":false}}},"viewerFriends":
{"response"

:{"1":{"aboutMe":"\tWhen I am working on a problem I never think about
beauty. I only think about how

 to solve the problem. But when I have finished, if the solution is
not beautiful, I know it is wrong

.\r\n","dateOfBirth":"1991-01-01","id":"1","name":
{"unstructured":"Venkata Suresh"},"isOwner":false,"isViewer"

:false},"2":{"aboutMe":"\tI am a man of fixed and unbending
principles, the first of which is to be flexible

 at all times.","dateOfBirth":"1992-02-01","id":"2","name":
{"unstructured":"Ganesh Kumar"},"isOwner"

:false,"isViewer":false},"3":{"aboutMe":"\tI always try to believe the
best of everybody -- it saves

 so much trouble.\r\n","dateOfBirth":"1993-03-01","id":"3","name":
{"unstructured":"Ashok kumar"},"isOwner"

:false,"isViewer":false},"4":
{"aboutMe":"Kool!!!","dateOfBirth":"1985-01-01","id":"4","name":
{"unstructured"

:"Sanjeev Srinidhi"},"isOwner":false,"isViewer":false},"5":
{"aboutMe":"nagraju mast maja maadi !!!!!

!!!!","dateOfBirth":"1985-12-11","id":"5","name":
{"unstructured":"nagraju"},"isOwner":false,"isViewer"

:false},"7":{"aboutMe":"Devil also scare to enter in my
domain","dateOfBirth":"1985-11-22","id":"7","name"

:
{"unstructured":"machi"},"isOwner":false,"isViewer":false}}}},"error":false}



THX

Cheers
Anand
--~--~---------~--~----~------------~-------~--~----~
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