Newer Version Available

This content describes an older version of this product. View Latest

Chatter in Apex Quick Start

This quick start shows you how to get started with Chatter in Apex. Follow the steps to use Chatter in Apex to display the Chatter feeds of two groups side by side in a Visualforce page.

You can also watch a video of this quick start: Watch Video Demo Using Chatter in Apex to Display Two Chatter Feeds in a Visualforce Page. The video displays the news feeds of two Salesforce Communities instead of two groups feeds, but the code is very similar.

Tip

Create an Apex controller that uses Chatter in Apex to populate a drop-down list with the groups that the logged-in user is a member of. The controller code then takes the selected group and gets first page of feed items for that group. Next, create a custom Visualforce component to display the feed items. Finally, create a Visualforce page that contains two instances of the custom component:

Two Chatter Feeds side by side in Salesforce

This quick start is designed to get you up and running with Chatter in Apex as quickly as possible so the user interface is very simple. In a real-world scenario, you would customize the user interface to match your organization’s branding.