Posts
Here's an overview of posts and how you can get started with integrating them into your applications
A feed is made up of a collection of posts. Users are able to generate different types of posts as well as to react and comment on posts.
Create a Text Post
When creating a text post, call the following method:
Create an Image Post
Create a File Post
Note. A post can consist of either a list of images or a list of files but not both.
Create a Custom Post
If text, image, and file types post are not enough for you. You can create your own type with whatever data you need for rendering. To do this, you need to call PostRepository.createPost
and pass dataType
, a string that defines the type of the post so you can distinguish your new post from others, and data, an object containing whatever data you need for your post.
Get Post
You can use the postForId()
method in order to get a single post:
Delete Post
Note. Only the post owner or an admin are able to update and/or delete a post.
Post Repository
As well as the general creation of posts, users are also able to interact with posts using the PostRepository
. This repository's main purpose is to manage posts, reactions, and flags on a post.
Update Post
Add Reaction
You can add a reaction to a post by calling the following method:
Remove Reaction
Add Comment
You can also add a comment to a post using our Comment feature:
See more on Comments
Flag Post
You can flag a post as inappropriate using the following method:
Check for isFlaggedByMe
Unflag Post
Last updated