ConnectApiHelper
ConnectApiHelper copied to clipboard
Error: Compile Error: Method was removed after version 35.0: postFeedElement at line 109 column 40
I'm getting error when adding the class into my instance with API 40.
It looks like the last paramater is no longer used.
Try this instead.
return ConnectApi.ChatterFeeds.postFeedElement(communityId, input);
From: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_ConnectAPI_ChatterFeeds_static_methods.htm
In version 36.0 and later, this method is no longer available because you can’t create a feed post and upload a binary file in the same call. Upload files to Salesforce first, and then use postFeedElement(communityId, feedElement) to create the feed post and attach the files.