Deleting A Stream
There are times when your extension wants to delete a stream item. This is often the case when your item is deleted from the site and you do not want any stream item related to this item to still be available on the stream.
To delete a stream item, it only takes a single line of code to remove an item. However, your code must be aware of the context that it is trying to delete.
For instance, when a photo is deleted from the site, the following codes are fired:
require_once(JPATH_ROOT . '/administrator/components/com_easysocial/includes/easysocial.php'); ES::stream()->delete($photoId, 'photos');
public function delete($contextId, $contextType, $actorId = '', $verb = '')
This is the first argument that the method accepts. It should be the context id of the item that you are trying to remove.
This should be the context type of the item that you are trying to remove.
If you only need to remove from specific users, supply the user id here.
If you only need to remove from specific verbsm supply the verb here.