You need to sign in to do that
Don't have an account?

Post Feed comment dynamically
Hi folks,
Can anyone tell me the answer for the following ques:
Is there anyway to post a feed comment dynamically for the particular feeditems in visualforce?
How to get the FeedItemId that I posted previously?
Thanks in advance
Karthick
Can anyone tell me the answer for the following ques:
Is there anyway to post a feed comment dynamically for the particular feeditems in visualforce?
How to get the FeedItemId that I posted previously?
Thanks in advance
Karthick
[select Id from FeedItem order by CreatedDate Desc limit 1]
For posting comment if you also need to include @mention in comment you should use connectApi method as below.
ConnectApi.ChatterFeeds.postComment(communityId, feedItemID, input, null)
If you do not require @mention in comment you can directly insert in to FeedComment object.
Hope this helps!
Thanks