Hi Avinash,

I got success to get freind list , the code to get freind list upto
1000 is-
Try this --
-----------------------------The javascript----------------- -

function loadFriends() {
  var req = opensocial.newDataRequest();
  var params = {};
  params[opensocial.DataRequest.PeopleRequestFields.MAX] = 1000;
  req.add(req.newFetchPersonRequest('VIEWER'), 'viewer');
 
req.add(req.newFetchPeopleRequest(opensocial.DataRequest.Group.OWNER_FRIENDS,
params), 'viewerFriends');
  req.send(onLoadFriends);
}

function onLoadFriends(data) {
  var viewer = data.get('viewer').getData();
  var viewerFriends = data.get('viewerFriends').getData();

  html = new Array();
  html.push('<ul>');
  viewerFriends.each(function(person) {
    html.push('<li>' + person.getDisplayName() + "</li>");
  });
  html.push('</ul>');
  document.getElementById('friends').innerHTML = html.join('');
}

function init() {
  loadFriends();
}
---------------------------xml code   -------------------
<?xml version="1.0" encoding="UTF-8"?>
<Module>
  <ModulePrefs title="Gifts part 1 - Friends">
    <Require feature="opensocial-0.7"/>
  </ModulePrefs>
  <Content type="html">
    <![CDATA[
      <script src="http://himanshu.googlecode.com/svn/trunk/example/
gifts_1_friends.js"></script>
      <script>
        gadgets.util.registerOnLoadHandler(init);
      </script>
      <div id='main'>
        Your friends:
        <div id='friends'></div>
      </div>
    ]]>
  </Content>
</Module>
---------------------------------------------


On Jun 17, 6:12 pm, "avinash srivastava" <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I am also not able to list all of my friends in my application. It list only
> 20 firends. Any idea ?
>
> Thanks
> Avinash
>
> On Tue, Jun 17, 2008 at 6:36 PM, Gaurav <[EMAIL PROTECTED]> wrote:
>
> > Hi,
> > I m not able to get the list of all my freinds list in my application.
> > And whenever i make changes on my xml file it will not reflect in
> > orkut apllication seems some caching problem in orkut container which
> > picks old xml value.
> > Please suggest
--~--~---------~--~----~------------~-------~--~----~
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