Using Chatter in Apex

Although Chatter data is accessible in Apex using SOQL queries, Chatter in Apex provides a simpler solution. It consists of a series of Apex classes called ConnectApi that expose Chatter features in a simpler way, as an API rather than a data model. With Chatter in Apex, Chatter data is preformatted for display, and many features can be accessed with a single method call. Using the data model is typically not as easy or concise.

Note

For more information about Chatter in Apex, visit the online documentation at http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_classes_connect_api.htm.

Listing 12.13 and Listing 12.14 are the Visualforce controller and page to display the current user’s feed items and comments. ...

Get Development with the Force.com Platform: Building Business Applications in the Cloud, Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.