使用Facebook SDK v5.0 OpenGraph 2.5检索帖子图像

In the past, when retrieving pictures from the OG, I used FB SDK 4.x and the following algorithm:

  1. Retrieve post ID by any means
  2. Retrieve the images for the post with the /{post-id}/attachments endpoint or edge.

Today, the version 4 of the FB SDK is not working for our new apps, and I can't find a way of retrieving the pictures uploaded along with a post.

Any ideas of what endpoint I need to use or how to query the existing endpoints for retrieving more than just the post caption, id and creation date?

I currently get the following error when I query the /{post-id}/attachemnts endpoint:

Graph returned an error: (#100) Tried accessing nonexisting field (attachments) on node type (Photo)array(0) { }

I also asked this question on a FB group and I got the answer there:

I needed to use the relative path as:

/{post-id}?fields=picture, field, field..

The list of fields is the same as specified in the documentation, it was just that I never saw instructions on how to retrieve them.

https://developers.facebook.com/docs/graph-api/reference/v2.5/post