Print this page

Pagination using chatter REST API

Knowledge Article Number 000175552
Description How to retrieve and display most recent 25 records of chatter feed using Chatter Rest API? How to get next 25 records using Chatter Rest Api without using apex code as we can display records on VF page using pagination?

Use jQuery toolkit to perform pagination for chatter rest API get the recent required records by setting pageSize=25 and you can do next for more result by using
["nextPageUrl"] and previos using ["previousPageUrl"].
For more information please go through the following link: 
To test the result of Feeditems, use workbench as follows:
1. Login to workbech "" using your org username and password.
2. Go to utilities tab and select Rest Explorer.
3. Select Get method and put "/services/data/v25.0/chatter/feeds/news/me/feed-items?pageSize=25" and click on execute.
It will show the number of records that you have mentioned for pageSize=? eg "pageSize=25". It will show recent 25 results.
Also it will show you next and previous URL to navigate.

promote demote