hi
 kanika

   viewerFriends.each is not a function

This has been solved the code is working properly.
all friends list I got
once again
thanks,

Deepak Suryawanshi



On Apr 10, 10:57 am, deepak <[EMAIL PROTECTED]> wrote:
> Hi  All,
>
> I am trying to fetch the friend list by using  this function which I
> have mention below.
> but I could not fetch more than 20 friends why? I want all friend
> list.
> help me out for this....
> //code is here
> <?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">
>
>   function getData() {
>     var req = opensocial.newDataRequest();
>
> req.add(req.newFetchPersonRequest(opensocial.DataRequest.PersonId.VIEWER),
> 'viewer');
>
> req.add(req.newFetchPeopleRequest(opensocial.DataRequest.VIEWER_FRIENDS,'
> viewerFriends');
>     req.send(onLoadFriends);
>   };
>
>   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>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Orkut Developer Forum" group.
To post to this group, send email to opensocial-orkut@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-orkut?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to