 <?xml version="1.0" encoding="UTF-8" ?>
<Module>
 <ModulePrefs title="Marina's Friends List" description="Just a test" screenshot="http://www.counttonine.com/images/google-screenshot.gif" title_url="http://www.girlsense.com" author="Marina" author_link="http://www.girlsense.com" author_location="Canada" height="600" >
   <Require feature="opensocial-0.5"/>   <Require feature="flash" />
 </ModulePrefs>
   
 <Content type="html">

 <![CDATA[

 <script type="text/javascript">

 /**
  * Request for friend information when the page loads.
  */
  function getData() {
    document.getElementById('message').innerHTML = 'Requesting friends...';
    var req = opensocial.newDataRequest();
    req.add(req.newFetchPersonRequest('VIEWER'), 'viewer');
    req.add(req.newFetchPeopleRequest ('VIEWER_FRIENDS'), 'viewerFriends');
    req.send(onLoadFriends);
    //showFaceMaker();
  };

 /**
  * Parses the response to the friend information request and generates
  * html to list the friends along with their display name and picture.
  *
  * @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;
  };
  //_IG_RegisterOnloadHandler(getData);

 

  // Play .swf file.
  function showFaceMaker() {

    // The URL for the .swf file that shows the specified trick.
    var url = "http://www.girlsense.com/premium/GSFacePlace/facePlaceSN.swf";

    // Play .swf file.
    _IG_EmbedFlash(url, "flashcontainer", {
      swf_version: 8,
      id: "flashid",
      width: 300,
      height: 300
    })
  }

  // When gadget first loads:
  _IG_RegisterOnloadHandler(showFaceMaker);

  </script>

  <div id="message"> </div>
  
  <div id="flashcontainer" ></div> 

  ]]>
  </Content>
</Module>















