function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
D_M_CD_M_C 

Grab all posts on the main Chatter page (within and outside of groups)

I am trying to move all Chatter activity from one instance to another using the Chatter SOAP API.  I cannot find the SOQL query to grab the posts on the main Chatter page.  Is there a simple query to grab every post on the Chatter page?  If it has to be broken down by User or Group, that's fine.

 

Note: I can create all the required Groups.  I can get a list of all the users and map them over to the other instance.  I just can't get the actual posts from the Chatter page.

Best Answer chosen by Admin (Salesforce Developers) 
Jia HuJia Hu
User FeedItem object to query all the posts in Chatter, it includes the posts on User, Group and Objects,...

http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_objects_feeditem.htm

All Answers

Jia HuJia Hu
User FeedItem object to query all the posts in Chatter, it includes the posts on User, Group and Objects,...

http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_objects_feeditem.htm
This was selected as the best answer
D_M_CD_M_C

The selected answer is correct.  My issue was that I had the 'ContentData' field in my query and this field seems to poinson all queries.  Removing that element allowed me to get all records.

Jia HuJia Hu
You have to use For Loop if you want to include the ContentData in the query, like

for(Feeditem fi:[Select Body, Title, Type, ContentData from FeedItem Where type = 'ContentPost' limit 5]) {
System.debug(fi.ContentData);
}