i am using the animated rose application from open social games
The important part of the code is:
function sendMessage(id)
{
var previewUrl = "
http://www.hi5.com/friend/apps/
displayAppCanvas.do?appId=29948&view=preview";
var messBody = "<a href='" + ownerProfileUrl + "'
target='_top'>" + ownerDisplayName + "</a> sent Animated Rose to you!
<br />Click <a href='" + previewUrl + "' target='_top'>here</a> to
accept :)";
var selected = document.getElementById
("selImage").innerHTML;
var mess = opensocial.newMessage(messBody);
mess.setField(opensocial.Message.Field.TITLE,
"Animated Rose for you!");
mess.setField(opensocial.Message.Field.TYPE,
opensocial.Message.Type.NOTIFICATION);
var recipients = new Array(1);
recipients[0] = id;
opensocial.requestSendMessage(recipients, mess,
handleSendMessage);