I have a requirement where the logged in user should be able to view all chatter posts which are having an @ mention to him. I need the exact chatter post to be shown as the user want to comment on the chatter post. Is there any way to do this by using chatter connect API. Any help is appreciated.

1 Answer 1


The following article helped me to display these chatter feeds .


Please make sure you keep the version of your classes to 28.There is a small bug here with version 29 and i am still working to fix this.

global class DemoController {

// get first page of news feed
global ConnectApi.FeedItemPage getNewsFeed() {
    return ConnectApi.ChatterFeeds.getFeedItemsFromFeed(null, ConnectApi.FeedType.News, 'me');

// build list of wrapped feed items for display in VisualForce
global List<FeedItemInfo> getNewsFeedForDisplay() {
    ConnectApi.FeedItemPage feed = getNewsFeed();      
    List<FeedItemInfo> result = new List<FeedItemInfo>();
    for (ConnectApi.FeedItem item : feed.items) {
        result.add(new FeedItemInfo(item));

    return result;
  • Can this be used to get all chatter posts having @ mention to to me? Mar 3, 2014 at 5:42

You must log in to answer this question.

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