I'm using forceChatter:publisherlightning component and would like to invoke some functionality when user click on "Share" button. enter image description here

Is there any event I could listen to? In Salesforce lightning inspector I can see application event is firing (forceChatter:postCreated) but when I add a handler for that event type it doesn't seem to work. eg. <aura:handler name="forceChatter:postCreated" event="forceChatter:postCreated" action="{!c.chatterPosted}"/>

Any ideas? Your help will be much appreciated :)


Just found the answer. Will leave an answer for future reference.

Since forceChatter:postCreated is an application event, we don't need to define name in the handler so the correct handler should be as follows.

<aura:handler event="forceChatter:postCreated" action="{!c.chatterPosted}"/>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.