Access Post Information

Each post is represented by an AmityPost instance. Each instance of AmityPost contains various information such as data, reactions, comments, metadata, child posts, etc. For text posts, you can access the actual data of the post through the data property.

Posts with images or files follow a parent-child relationship. Each image or file uploaded is a separate child post. Any text you specify when creating an image/file post acts as a parent post. The parent post contains childrenPosts property, which provides you with an array of AmityPost.

You can access the data of the child posts via the same property data. Alternatively, you can access more details about uploaded files and images via the getFileInfo() or getImageInfo() method.

Last updated