I am getting an error when using the ConnectApi
to post a feed:
ConnectApi.NotFoundException: Resource not found. Class.ConnectApi.ChatterFeeds.getFeedElement: line 1502, column Class.ChatterPostParser: line 154, column 1 Class.RestComments.insertComment: line 66, column 1
I am trying this code:
List<User> mentionUsers = new List<User>();
ConnectApi.CommentInput feedCommentInput =
ChatterPostParser.parseChatterCommentWithMentions(comment, mentionUsers);
ConnectApi.Comment commentRep = ConnectApi.ChatterFeeds.postCommentToFeedElement(
Network.getNetworkId(),
(Id)feedId,
feedCommentInput,
null);