Hi,

I am trying to send a message using the requestSendMessage API , but
have been unsuccessful in doing so. I don't see any errors, but the
callback function does not get called either.  Following is the code
sample that i am using.

          var params = [];
          params[opensocial.Message.Field.TITLE]="Hello";
          params[opensocial.Message.Field.TYPE]
=opensocial.Message.Type.EMAIL;

          var body="Here is an interesting app.";
          var message = opensocial.newMessage(body, params);
          var recipient = user_id;
          opensocial.requestSendMessage(recipient,
message,invite_message_callback);

user_id is passed to this function, selected from a list of friends
shown in the gadget. the friend list is retrieved using this function

          var req = opensocial.newDataRequest();
          var params = {};
          params[opensocial.DataRequest.PeopleRequestFields.PROFILE_DETAILS]
=
                  [opensocial.Person.Field.ID, opensocial.Person.Field.NAME];
          var idspec = opensocial.newIdSpec({ "userId" : "OWNER", "groupId" :
"FRIENDS" });
          req.add(req.newFetchPeopleRequest(idspec, params), "req");
          req.send(invite_data_response);


Am i using the wrong user ID? Are there an pre-built templates for
sending invites?


Thanks,
Aj

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