How to get group posts and their comments from Workplace Graph API in a single request?

1.7k Views Asked by At

I know I can get all the posts in a group using the Graph API endpoint /group-id/feed. And I know I can get all the comments of a single post too. But I want to know if it's possible to get the comments of each posts in a group in a single request.

Ideally, I would want something like "get the latest 10 posts of a group with their comments" in a single request.

Couldn't find anything in the docs so it's probably not possible.

1

There are 1 best solutions below

3
On BEST ANSWER

you can use the fields parameter

/group-id/feed?fields=message,comments

in this way you are able to retrieve the message of the post and all the comments related to it