Hey all,
               I am trying to increase the virality of app by passing an
array of selected user id's to opensocial.requestSendMessage but it throws
me an error with response code as bad request,
 Following is my code :

users = new Array();
users[1] = "xxxxxxxxxxxxxxxxxxxx" ; //user id #1
users[0] = "xxxxxxxxxxxxxxxxxxxx";  //user id #2
var params = {};
params[opensocial.Message.Field.TYPE] =
opensocial.Message.Type.PRIVATE_MESSAGE;
params[opensocial.Message.Field.TITLE] = "Title";

var message = opensocial.newMessage("Body", params);

opensocial.requestSendMessage(users, message, function(resp){
   if (resp.hadError()) {

      alert('There was an error!\nResponse code:
'+resp.errorCode_+'\nResponse message: '+resp.errorMessage_);
   } else {
  }
});

>
>> To this code, orkut returns me , the following output

We did not understand your last request.

Please make sure your request is complete and valid.
You are seeing this page probably because your action was considered invalid
by orkut.com site



If i pass only one element of array in the argument(i.e. users[0]) , then it
works fine and pops up the requestSendMessagedialog . It works fine with
other options too.

Can someone please help me with this ?  Or would it be better to just wait
for requestShareApp() when it is available ?

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