0

Is there anyway to post a feed comment dynamically for the particular feeditems in visualforce?

Please help!

2

I don't know if understand your question, but if you want to post a comment, you can use:

Chatter Rest API: http://www.salesforce.com/us/developer/docs/chatterapi/

Apex Controller: http://www.salesforce.com/developer/docs/api/Content/sforce_api_objects_feedcomment.htm#topic-title

| improve this answer | |
  • If you are accessing Chatter from Apex directly, you are better off using the ConnectAPI, since that is just a namespace in Apex – BritishBoyinDC Oct 24 '14 at 15:29
1

You can use the PostComment Method on the ConnectAPI (which is effectively an Apex enabled version of the Chatter REST API) if you know the FeedItem/Feed Element you are trying to post to: From docs:

ConnectApi.Comment comment = ConnectApi.ChatterFeeds.postCommentToFeedElement(null, '0D5D0000000KuGh', 'I agree with the proposal.' );

Where first param is Community Id, second is the Feed Element Id, and final param is the actual text.

I also did a session at DF14 which you can see here explaining how to get started with the ConnectAPI

| improve this answer | |
  • I wanna post a feed comment dynamically to the particular post.For that what I hve to do? – user3332076 Oct 25 '14 at 6:29

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.