+ Start a Discussion

How to @Mention in Chatter from Apex?

I recently read this feature was delivered in Winter '12, but I can't find any documentation about how to accomplish it.


Is anyone here adding @mentions to FeedItems from Apex, or is it intended to only be a REST API thing?


At this time posting feed items with @-mentions is only available through the Chatter REST API.


Chatter in Apex will be generally available in the Summer '13 release, and it allows you to make @-mentions in Apex. See the code snippet I posted here: