+ Start a Discussion
tggagnetggagne 

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?

ChrisOctagonChrisOctagon

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

alouie_sfdcalouie_sfdc

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:

 

http://boards.developerforce.com/t5/Apex-Code-Development/Need-to-add-mention-through-Apex-code-in-chatter-post/m-p/435507/highlight/false#M79134