1

My class version is 40.0 .

i have created trigger on task object when task is open its post on chatter and tag a user but the error is Error: Compile Error: Method was removed after version 31.0: postFeedItem

  ConnectApi.ChatterFeeds.postFeedItem(null, ConnectApi.FeedType.UserProfile, tery.userId, input, null);

1 Answer 1

4

As per these Summer 14 release:

The getFeedItem and postFeedItem methods are still supported, but to future-proof your applications, use the getFeedElement and postFeedElement methods. For example, as of API version 31.0, the only feed element types are feed item and bundle, but that could change in future releases.

So it's better to use postFeedElement() method.

postFeedElement(String, String, ConnectApi.FeedElementType, String) — Posts a feed element with plain text from the context user.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .