Ok,

this is a XML code:

<?xml version="1.0" encoding="UTF-8"?>
<Module>
  <ModulePrefs title="Bolão da Copa adidas"
screenshot="********************************************************/
img/screenshot_******.jpg"
thumbnail="********************************************************/
img/******_logo.jpg"
description="********************************************************"
author="Cricket Design" author_email="tecnolo...@cricketdesign.com.br"
               height="650"
               width="760">

<Require feature="opensocial-0.8" />
<Require feature="opensocial-0.7" />
<Require feature="flash" />
<Require feature="dynamic-height" />

<Preload
href="********************************************************/img/
loading_orkut.gif" />
  </ModulePrefs>
<Content type="html" view="canvas">
 <![CDATA[
  <script
src="********************************************************/js/
swfobject.js"></script>
  <script
src="********************************************************/js/
swffit.js"></script>
 <script>

var friends = new Array();
var id_user = "";

function getFriends() {

  var params = {
      "profileDetail" : [
          "profileUrl",
          "thumbnailUrl"
      ],
      "max"           : 1000
  };



  var req = opensocial.newDataRequest();
  req.add(req.newFetchPeopleRequest(
  opensocial.DataRequest.Group.VIEWER_FRIENDS, params),
"ownerFriends");
  params = {};
  params[opensocial.DataRequest.PeopleRequestFields.PROFILE_DETAILS] =
[
    opensocial.Person.Field.ABOUT_ME,
    opensocial.Person.Field.STATUS,
    opensocial.Person.Field.THUMBNAIL_URL
  ];

  req.add(req.newFetchPersonRequest("VIEWER", params),
"viewer_profile");
  req.send(processPerson);
};


function processPerson(data) {
          var ownerFriends = data.get('ownerFriends').getData();
          var viewer = data.get("viewer_profile").getData();
          id_user = viewer.getId();
      var qtd = 0;
          html = new Array();
      ownerFriends.each(function(person) {
          friends.push(person.getId()
+';;'+person.getField('thumbnailUrl')+';;'+person.getDisplayName());
          qtd = qtd+1;
      });
      try {
       // thisMovie('site', friends);
       // alert("duplo ola");
        return friends.join(',');
      }catch(el){
        alert("saiu do try por erro: "+el);
      }
}

function onActivityPosted(data) {
  if (data.hadError()) {
   // alert("There was a problem: " + data.getErrorMessage());
  } else {
    //
  }
};

function postActivity(title, body) {
  var data = {};
  data[opensocial.Activity.Field.TITLE] = title;
  data[opensocial.Activity.Field.BODY] = body;
  var activity = opensocial.newActivity(data);
  opensocial.requestCreateActivity(
      activity,
      opensocial.CreateActivityPriority.HIGH,
      onActivityPosted
  );
};

function sendEmail(title, body, idDoUser) {
  var params = [];
  params[opensocial.Message.Field.TITLE] = title;
  params[opensocial.Message.Field.TYPE] =
      opensocial.Message.Type.EMAIL;

  var message = opensocial.newMessage(body, params);
  var recipient = idDoUser;
  opensocial.requestSendMessage(recipient, message, callback);
};

function callback(data) {
  if (data.hadError()) {
  //  alert("There was a problem:" + data.getErrorCode());
  } else {
  //  output("Ok");
  }
};

function responseId(data) {
  var viewer = data.get("viewer_profile").getData();
  var aboutme = viewer.getField(opensocial.Person.Field.ABOUT_ME);
  var status = viewer.getField(opensocial.Person.Field.STATUS);
  var img = viewer.getField(opensocial.Person.Field.THUMBNAIL_URL);
  id_user = viewer.getId();
  var name = viewer.getDisplayName();
  friend = processPerson(data);
  try{
      loadingFlash(id_user, friend);
  } catch(e){
        alert(e);
  }
};

function getUserId() {
   try{
   var req = opensocial.newDataRequest();
   var params = {};
   params[opensocial.DataRequest.PeopleRequestFields.PROFILE_DETAILS]
= [
     opensocial.Person.Field.ABOUT_ME,
     opensocial.Person.Field.STATUS,
     opensocial.Person.Field.THUMBNAIL_URL
   ];
   try{
   params[gadgets.io.RequestParameters.AUTHORIZATION] =
gadgets.io.AuthorizationType.SIGNED;
   params[gadgets.io.RequestParameters.CONTENT_TYPE] =
gadgets.io.ContentType.TEXT;
   }catch(e){
      alert(e);
   }
   req.add(req.newFetchPersonRequest("VIEWER", params),
"viewer_profile");

   var params = {
      "profileDetail" : [
          "profileUrl",
          "thumbnailUrl"
      ],
      "max"           : 1000
  };
 
req.add(req.newFetchPeopleRequest(opensocial.DataRequest.Group.VIEWER_FRIENDS,
params), "ownerFriends");
   req.send(responseId);
   }catch(e){
     alert('Não é possível acessar as informações do seu perfil.\r
\nPor alguma razão você foi desconectado temporariamente.');
   }
}

function thisMovie(movieName, fr){
    if(navigator.appName.indexOf("Microsoft") != -1){
        return window[movieName].testando(fr.join(','));
    }else{
        return document.movieName.testando(fr.join(','));
    }
}


function loadingFlash(id, friend){
   var flashvars = {};
   flashvars.orkut_id = id;
   flashvars.orkut_friends = friend;
                        var params = {
                                                        menu: false,
                                                        allowFullscreen: true,
                                                        allowScriptAccess: 
"always",
                                                        allowNetworking: "all",
                                                        quality: "high"
                                                };

                        var attributes = {};
                        //attributes.id = "myDynamicContent";
      try{
        
swfobject.embedSWF("********************************************************/
swf/index.swf", "site", "760", "625",
"9.0.0","********************************************************/swf/
expressInstall.swf", flashvars, params, attributes);
                   swffit.fit("site");
      }catch(e){
         alert(e);
      }
}


gadgets.util.registerOnLoadHandler(getUserId);

function showFriends(){
   return friends;
}

 </script>
 <div style="height:680px" id="site"> 
  <div style="text-align:center">
     <img
src="********************************************************/img/
loading_orkut.gif" />
  </div>
</div>
<script>
gadgets.window.adjustHeight();
</script>
  ]]>
</Content>
</Module>

Where are a Error, in the Flash or XML code?

-- 
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-or...@googlegroups.com.
To unsubscribe from this group, send email to 
opensocial-orkut+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/opensocial-orkut?hl=en.

Reply via email to