Hi Viswanath,
Luckily there is already an example for the same in the developers
guide section. I would any ways paste the same example below

Incase, the following example is not a good enough help for you,
please get back to me with more specific queries -

Developer's Guide - 
http://code.google.com/apis/opensocial/docs/0.7/devguide.html

Example snippet -
<?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>

Thanks,
Rohit

On May 25, 11:42 am, viswanath vellaiappan
<[EMAIL PROTECTED]> wrote:
> Hello Everybody!
>           I would like to develop and app in orkut which needs to
> search for the friends and select one among them. It would be great if
> it is very similar to what orkut provides in the home page
> (dynamically list top 10 results). I would be glad if you could help
> me!
>
> Thanks,
> Viswanath Vellaiappan
--~--~---------~--~----~------------~-------~--~----~
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