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

Chatter REST API for getting popular post

Is there an API to get most popular posts depending on the likes received?


There is not a specific resource, but you can do it using the standard REST API query capability.


LMK if you need the SOQL. I have it lying around somewhere.


Thanks for your reply.

Could you please let me know about it.

It would really be a great help for me.




Check out the getRecipeEightTopPosters()  method from Chatter Commons:



Thanks for your reply.I gone through the link you gave.

It mentions about Apex api.

How do we do this using chatter REST API? I have a sample web application which uses chatter REST API?

My requirement is to fetch posts for last 3 months from all the users in my group.




you just need to use the SOQL query from the code sample I posted you to and use the search support in the REST API.




/services/data/v20.0/query?q=SELECT Name from Account Limit 100 


Just remember that you will need to URL Encode your query string (I left it out in the example above just to make it easier to read)