Hi Chakri,
Sorry for the late response.

You need to embed the jsfile in the gadget xml. As you would already
know a OpenSocial application needs to be a gadget xml, which includes
<Require feature="opensocial-0.7"/> to include the opensocial apis.
Apart of the Module Prefs, Requires feature and User Preference, the
gadget xml is more of your html and javascript code. In the Content
part you would include your jsfile and code as it you are coding html
and js code in a regular web page.

I am including a sample for your reference below. Let me know if you
need any thing else.



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


Best,
Rohit

On May 26, 2:38 am, chakri <[EMAIL PROTECTED]> wrote:
> Hi All,
>
>        I  am new to opensocial.I am confused to start an application.I
> have gone through the links  to know details about opensocial.I have
> the jsfile where I have written the script .I wanted to know what the
> next step I have to do.can anyone help me to get my problem solved.
>
> thanks and regards
> chakri..
--~--~---------~--~----~------------~-------~--~----~
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