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 will be able to generate different types of posts as well as to react and comment on posts. SDK provides different builder classes to create each type of post. First, you need to build the post by using one of the builder classes. Then use the instance of AmityFeedRepository
to actually create the post. createPost
method requires instance of builder, targetId
and targetType
. TargetType is an enum with two cases, which are user
and community
.
If you want to create a post on a particular user's feed, you can provide the id of that user for targetId
parameter and set the targetType
to user
. If you want to create a post on your own feed, set targetId
to nil
. If you want to post on a particular community, then targetType
would be community
.
A single post can have up to 20,000 characters. For custom post, JSON data must not exceed 100KB in size.
Post Description
Name | Data Type | Description | Attributes |
|
| ID of the post | |
|
| ID of the parent post | |
|
| ID of the user who posted | |
|
| ID of the user who shared the post | |
|
| Number of times the post is shared | |
|
| ID of the target | |
|
| Type of target | |
|
| Data type of post | |
|
| Data of the post | |
|
| Metadata of the post | |
|
| Number of times that the post is flagged | |
|
| Date/time the post was edited | |
|
| Date/time the post was created | |
|
| Date/time the post was updated | |
|
| Information about the post reactions | |
|
| Number of reactions to the post | |
|
| Reactions to the post | "like", "love", etc... |
|
| Number of comments to the post | |
|
| Comments to the post | |
|
| Children posts | |
|
| Flag that indicates if the post is deleted. True means post is already deleted. |
Post Repository
To use all post features, you must create AmityPostRepository
.
Last updated