I use this if GiftExchange to do a similar job:
// Include for uddeIM API
require_once( JPATH_SITE."/components/com_uddeim/uddeim.api.php" );
//and the message itself
$uddeim = new uddeIMAPI();
$uddeim->sendNewMessage($data, $uid, 'I have sent you a virtual gift - (This is an automatically generated message from Buzz50) - To see the gift that this Buzzer has sent you along with any message click the My Gifts received menu item under the Profiles menu', true, true);
So what I am really asking is where to put this for profile wall updates.