Hey its working fine on my side. try to install code runner and check in that. http://opensocial-resources.googlecode.com/svn/samples/coderunner/trunk/coderunner.xml
On Apr 10, 5:00 pm, deepak <[EMAIL PROTECTED]> wrote: > hi > Kanika > > thanks for helping out but still I am getting error which I have > mention below > > viewerFriends.each is not a function > viewerFriends.each(function(person) { > > after change the code is like this > //here the code > function getData() { > > var params = {}; > params[opensocial.DataRequest.PeopleRequestFields.MAX]=30; > var req = opensocial.newDataRequest(); > > req.add(req.newFetchPersonRequest(opensocial.DataRequest.PersonId.OWNER),"owner"); > > req.add(req.newFetchPeopleRequest(opensocial.DataRequest.Group.OWNER_FRIENDS,params),"ownerFriends"); > req.send(onLoadFriends); > alert("hi I am In or out"); > }; > > gadgets.util.registerOnLoadHandler( getData); > > function onLoadFriends(dataResponse) { > var viewer = dataResponse.get('owner').getData(); > var html = 'Friends of ' + viewer.getDisplayName(); > html += ':<br><ul>'; > var viewerFriends = dataResponse.get('ownerFriends').getData(); > > viewerFriends.each(function(person) { > html += '<li>' + person.getDisplayName() + '</li>'; > }); > html += '</ul>'; > document.getElementById('message').innerHTML = html; > }; > > // end > > Thanks and Regards > Deepak Suryawanshi > > On Apr 10, 11:53 am, Kanika <[EMAIL PROTECTED]> wrote: > > > Hi deepak > > > You have to make some changes in your code while requesting. > > Eg: > > > function getData() > > { > > var params = {}; > > params[opensocial.DataRequest.PeopleRequestFields.MAX] = 100; > > var req = opensocial.newDataRequest(); > > req.add(req.newFetchPersonRequest(opensocial.DataRequest.PersonId.OWNER),"owner"); > > req.add(req.newFetchPeopleRequest(opensocial.DataRequest.Group.OWNER_FRIENDS,params),"ownerFriends"); > > req.send(onLoadFriends); > > }; > > > Regards > > Kanika > > > 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 -~----------~----~----~----~------~----~------~--~---