+ Start a Discussion
Sagar MadkaikarSagar Madkaikar 

How to display Chatter Feed for particular selected account in Lightning Components using <forceChatter:feed>


Does any one know how to display Chatter feeds based on particular record(Account Record) using <forceChatter:feed>?

Here is the code :
<aura:component implements="force:appHostable">

    <forceChatter:feed type="Record" subjectId="001XXXXXXX"/>	   

Here we are populating the parameters as mentioned in the lightning documentation.
The subjectId is hardcoded with sample account Id.

But the result shows no feeds.

If we change the type to "News", then It shows all the feeds from current user.

We want it to be specific to the Account Id given.

Please help.

Sagar Madkaikar
Pranali Lad 12Pranali Lad 12
Hi Sagar,

Were you able to find a solution for this? I'm running into a similiar issue where the tag results in no feed being shown on the community.

Hi Sagar, 
Try this way

<aura:component implements="force:appHostable,force:hasRecordId,force:lightningQuickAction">
    <forceChatter:feed type="Record" subjectId="{!v.recordId}"/>

Nitish Singh
Hemant Rana 28Hemant Rana 28
@Nitish - I know it's very late to comment on this post but I am facing some issue similar to this. I was able to show the feed for a particular account but I was not able comment , add new post. Is there any limitation or salesforce bug? 
Olavo Zapata 14Olavo Zapata 14

Hi @Hermant
How can you fix to show the feed for a particular account?? For me looks that have some bug.

I'm using a component like the following one and its not showing me.

<aura:component controller="ChatterParentController" implements="flexipage:availableForRecordHome,force:hasRecordId" access="global" >
    <aura:attribute name="recordId" type="Id" />
    <aura:attribute name="parentId" type="String" />
    <aura:handler name="init" value="{!this}" action="{!c.doInit}" />
<!-- Test to see if is the response is right -->
    Opportunity Id is {!v.recordId} <br></br>
    Account Id is {!v.parentId}
    <!--<forceChatter:publisher context="GLOBAL" />-->
    <forceChatter:feed type="Record" subjectId="{!v.parentId}" />


	doInit : function(component, event, helper) {
        var action = component.get('c.getParentId');
            recordId: component.get('v.recordId')
        action.setCallback(this, function(data) {

Running my test to showing up just above chatter is right. Show the correct accountId.

Do you have an idea how to fix it? Thanks..
Olavo Zapata 14Olavo Zapata 14
I found a way using through $A.createComponent