sendAnnouncement( )

sendAnnouncement API allows you to dynamically send announcements to a particular user.



Sample Code

Ideal use of this function is to inform the user when an activity happens. Say you have a function which posts messages to a user’s wall.

function wallPost($fromID, $toID, $fromName, $toName, $message) {
    // Perform actual wall post

    include_once ('cometchat/cometchat_init.php');
    sendAnnouncement($toID,"You have a new wall post from ".$fromName);

Not finding what you need?

The CometChat team is here to help!