Please refer to the API reference for instructions on using
requestSendMessage:
http://code.google.com/apis/opensocial/docs/0.8/reference/#opensocial.requestSendMessage
You can try the folllowing code in the OpenSocial Dev App (http://
osda.appspot.com/) for sending a message to friends :
function sendEmail(title, body) {
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 = "OWNER_FRIENDS";
opensocial.requestSendMessage(recipient, message, callback);
};
function callback(data) {
if (data.hadError()) {
alert("There was a problem:" + data.getErrorCode());
} else {
output("Ok");
}
};
sendEmail("This is a test email", "How are you doing?");
Note how you will be presented with a send mail window, where you can
type the first few letters of the owner's friends name and select the
friend from the suggested list of friends.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Orkut Developer Forum" group.
To post to this group, send email to [email protected]
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
-~----------~----~----~----~------~----~------~--~---