function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Chris M 11Chris M 11 

Create Feeds from for community users

Hi,

We have a requirement to create feeds for community users. We used this method.

ConnectApi.FeedElement feedElement = ConnectApi.ChatterFeeds.postFeedElement(Network.getNetworkId(), '*userId*', ConnectApi.FeedElementType.FeedItem, 'On vacation this week.');

We always get an error like "Resource not found" . Could someone please guide us in this..

Thank you for your time.

Regards,
Christwin
John Meinen 6John Meinen 6
Hi Christwin,

I have exactly the same problem. Have you found a solution for this?

Regards,

John,
John Meinen 6John Meinen 6
Found it: had to provide the Community ID. Network.getNetworkId() returns null.