Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Amity SDK provides developers with a powerful set of tools for creating a wide range of post types with support for a broad range of content formats, users can create highly dynamic and engaging posts that help to drive user engagement and increase retention, including:
We provide a method for creating each type of post. To create a post, you must first select the target type. The target type is either a user or a community.
User: If you wish to create a post on someone else's feed, provide their user ID as the targetId and set the target type to the user. If you want to create a post on your own feed, leave the target ID empty.
Community: To make a post on a specific community, set the target type to community and provide the community ID.
Each post can have up to 20,000 characters, and custom posts should not have JSON data that is larger than 100KB.
Prior to creating a file post, it is crucial to upload the files that will be included in the post data to ensure that the necessary information is accessible and can be linked to the post. This requires uploading the file first, to obtain the file data that will be used in creating the file post. To upload a file, please refer to #upload-files
Upon successful completion of the file upload process, you can include the file data as a parameter when creating a file post, as demonstrated in the code sample below.
Here's an explanation of the method's parameters:
text
: This is a required parameter of type String
, which represents the text content of the new post. You can pass in any text you want to include in the post, up to a maximum length of 20,000 characters.
files
: Which represents an array of files uploaded by the user on Android, iOS and Flutter and fileIds
for Typescript and Javascript to include in the new post. You can pass up to 10 files in a post.
targetType
- Type of the target, either a particular community or a user feed.
tags
- Arbitrary strings that can be used for defining and querying for the posts.
metaData
- Additional properties to support custom fields.
We can build the post first by using AmityFilePostBuilder
. Then use the createFilePost
method in AmityPostRepository
to create a file post.
We can build the post first by using AmityFilePostCreator.Builder
. Then use the same createPost
method in AmityPostRepository
to create an image post.
Version 6
Beta
Refer to Post target type for a more detailed explanation of the targetType
parameter.
Updating files in a file post is not yet supported.
Refer to Post target type for a more detailed explanation of the targetType
parameter.
A post can have a maximum of ten files.
Prior creating a video post, it is crucial to upload the videos that will be included in the post data to ensure that the necessary information is accessible and can be linked to the post. This requires uploading the video first, to obtain the video data that will be used in creating the video post. To upload a video, please refer to
Upon successful completion of the video upload process, you can include the video data as a parameter when creating a video post, as demonstrated in the code sample below.
Here's an explanation of the method's parameters:
text
: This is a required parameter of type String
, which represents the text content of the new post. You can pass in any text you want to include in the post, up to a maximum length of 20,000 characters.
videos
: Which represents an array of videos uploaded by the user on Android, iOS and Flutter and videoIds
for Typescript and Javascript to include in the new post. You can pass up to 10 videos in a post.
targetType
- Type of the target, either a particular community or a user feed.
tags
- Arbitrary strings that can be used for defining and querying for the posts.
metaData
- Additional properties to support custom fields.
Requirements for Video
Supported video types are 3gp
, avi
, f4v
, flv
, m4v
, mov
, mp4
, ogv
, 3g2
, wmv
, vob
, webm
, mkv
The maximum file size of the video is 1 GB
The maximum duration of the video is 2 hours
We can build the post first by using AmityVideoPostBuilder
. Then use the createVideoPost
method in AmityPostRepository
to create a video post.
We can build the post first by using AmityFilePostCreator.Builder
. Then use the same createPost
method in AmityPostRepository
to create an image post.
Version 6
Beta
A post can have a maximum of ten videos.
Uploading HDR video format is not supported on iOS.
Text posts are a simple yet powerful way to create and share text-based content with other users on our platform. With the Amity Social SDK, users can quickly and easily create text posts and add them to a user's or community's feed. As demonstrated in the code sample below, you can simply include the text data as a parameter when creating a text post.
Here's an explanation of the method's parameters:
text
: This is a required parameter of type String
, which represents the text content of the new post. You can pass in any text you want to include in the post, up to a maximum length of 20,000 characters.
targetType
- Type of the target, either a particular community or a user feed.
metaData
- Additional properties to support custom fields.
tags
- Arbitrary strings that can be used for defining and querying for the posts.
Use AmityTextPostBuilder
to create text post.
Version 6
Beta (v0.0.1)
Prior to creating an image post, it is crucial to upload the images that will be included in the post data to ensure that the necessary information is accessible and can be linked to the post. This requires uploading the image first, to obtain the image data that will be used in creating the image post. To upload an image, please refer to .
Upon successful completion of the image upload process, you can include the image data as a parameter when creating an image post, as demonstrated in the code sample below.
Here's an explanation of the method's parameters:
text
: This is a required parameter of type String
, which represents the text content of the new post. You can pass in any text you want to include in the post, up to a maximum length of 20,000 characters.
images
: Which represents an array of images uploaded by the user on Android, iOS and Flutter and imageIds
for Typescript and Javascript to include in the new post. You can pass up to 10 images in a post.
targetType
- Type of the target, either a particular community or a user feed.
tags
- Arbitrary strings that can be used for defining and querying for the posts.
metaData
- Additional properties to support custom fields.
We can build the post first by using AmityImagePostBuilder
. Then use the createImagePost
method in AmityPostRepository
to create image post.
We can build the post first by using AmityImagePostCreator.Builder
. Then use the same createPost
method in AmityPostRepository
to create an image post.
An image post data structure is:
Updating image post in JS SDK is not yet supported.
Version 6
Beta (v0.0.1)
Updating images in image post is not yet supported.
Refer to Post target type for a more detailed explanation of the targetType
parameter.
A post can have a maximum of ten images.
Here's an overview of posts and how you can get started with integrating them into your applications
A post can be defined as a piece of content created and shared by a user within a network or community. The post can include various types of information such as text, images, videos, links, or other multimedia elements. The SDK provides the necessary tools and functionality for users to create, view, and interact with posts in a social feed. Posts can be displayed in chronological order and can be customized and configured using various settings and options provided by the SDK. The purpose of a post in a product context is to allow users to share information, express thoughts, or connect with others within a social network or community using the SDK.
Amity supports a wide range of post types, each with its own unique set of features and capabilities. The types of posts that you can create in Amity include text, image, video, file, live stream, poll, and custom posts. Furthermore, a post supports real-time events and Live Object features, for more information please refer to and
The post structure is a parent-child relationship, with the parent post serving as a container for text data, for other post types such as images or videos, while each individual image or video is treated as a separate child post. To illustrate this, let's take the example of an image post with two images. In this case, there would be one parent post serving as a text container, and two child posts, each containing one of the images.
In addition to enabling users to create more dynamic and engaging content, both parent and child posts also support reactions and comments. This means that users can interact with not only the parent post but also with each individual child post, providing a more comprehensive and engaging way to engage with content.
The functionality of posts can be utilized through the Post Repository, which offers methods for interacting with a data source that stores posts. This includes methods for obtaining a specific post, creating a new post, updating an existing post, or deleting a post.
Supported ✅ (Please wait while we prepare a real example!)
Name | Data Type | Description |
|
| ID of the post |
|
| ID of the parent post, this can be null if the post is a 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 |
|
| Number of comments to the post |
|
| The first three comments of the post for previewing purpose |
|
| Children posts |
|
| Flag that indicates if the post is deleted. True means post is already deleted. |
|
| Flag that indicates if the post has flagged comments. True means it has. |
|
| Flag that indicates if the post has flagged children. True means it has. |
|
| Arbitrary strings that can be used for defining and querying for the posts in community and user feeds. |
|
| ID of the post's feed |
Prior to creating a poll post, it is crucial to create the poll that will be included in the post data to ensure that the necessary information is accessible and can be linked to the post. This requires creating the poll first, to obtain the data that will be used in creating the poll post. For more information about polls including vote, close, or delete a poll, please refer to the page - Poll.
text
: This is a required parameter of type String
, which represents the text content of the new post. You can pass in any text you want to include in the post, up to a maximum length of 20,000 characters.
pollId
: The ID of the created poll to include in a post.
targetType
- Type of the target, either a particular community or a user feed.
tags
- Arbitrary strings that can be used for defining and querying for the posts.
As demonstrated in the code sample below, here's a way to create a poll and poll post.
Version 6
Beta (v0.0.1)
metaData
- Additional properties to support custom fields.
The Social SDK product includes a powerful Posts Query method that allows users to search for and retrieve posts that match specific criteria. This functionality is useful for a variety of use cases and provides a flexible and customizable approach to managing and displaying content in your app. Furthermore, the result of the method will always return as Live collection.
Posts Query API can be useful for the use cases that require flattening the search and results. For example:
All posts in a community or user feed
Media gallery that shows the list of all images, posted by a user
List of all the text posts that are deleted in a community
The Posts Query method is capable of retrieving and searching all posts on the server that match the specified criteria, which are:
targetId
- ID of the community or user respectively.
targetType
- Type of the target, either a particular community or a user feed.
types
- available post types are video
, image
, file
, liveStream
, poll
and custom
post. Alternatively, if you don't specify a particular post type, it will return all post types for a specific target.
includeDeleted
- Deletion filter. When the boolean is set to true
, it retrieves both deleted and non-deleted posts. Conversely, when set to false
, only non-deleted posts are returned. The default state of the boolean is false
. Additionally, it excludes all deleted posts (both soft and hard deleted posts) not owned by the logged-in user. Community moderators have visibility of soft-deleted posts in the community feed, while self-users can see their own soft-deleted posts in their user feed.
sortBy
- When it is set to "lastCreated", the most recently created posts will appear at the top of the result. Conversely, when the "sortOption" is set to "firstCreated", the earliest created posts will be displayed at the top of the result.
feedType
- Type of the feed, for possible feedTypes please refer to - #feed-types.
Version 6
Beta (v0.0.1)
In Flutter SDK, supported query post types are "video
", "image
" and "file
".
For custom post, follow a namespace like format.
Example: "my.customtype
"
If you'd like to display content on your app that cannot be represented by the available text, image, video, and file post types, you can create your own custom post type. Custom post types allow you to include the necessary data for rendering, such as additional metadata and custom data formatting. This is useful if you want to present specific types of content to your users.
To create a custom post type, you can query the user, community, or global feed using our SDK's APIs. Please refer to Feed. For additional information on rendering custom posts with UIKit, please see Post Rendering.
dataType
- a string that defines the type of the post so you can distinguish your new post from others
data
- a free-form JSON object that can be customized based on your use cases.
attachments
- images and other files you want to include in your post. You can only attach one file type. This means that it must either be all images, all files, or all video files.
tags
- text that will be used in post query. You can add up to five tags. Each tag can have a maximum length of 24 characters.
The dataType
parameter should have the custom
prefix.
The functionality isn't currently supported by this SDK.
Please refer to the web API for custom post creation.
Version 6
Beta (v0.0.1)
The functionality isn't currently supported by this SDK.
Please refer to the web API for custom post creation.
The Amity SDK provides a functionality that allows you to work with social features in your application, including the ability to retrieve a post. In this section, we'll explore how to use the Amity SDK to retrieve a single post from your application. By using a specific function provided by the SDK, you can retrieve a post based on its ID, which provides a convenient way to access specific post data. The retrieved result is returned as a live object of a post. For more information on live objects, please refer to Live Objects/Collections.
Version 6
Beta (v0.0.1)
You can use the getPost()
method to get a single post. You need to pass the postId
of the requested post as the parameter.
In order to get live update from any changes or bind with StreamBuilder
widget, you can alternatively use AmityPost.listen
To retrieve multiple posts, you can use getPostByIds
method provided by PostRepository
. This method accepts a collection of postId
as a parameter and returns a Live Collection ofAmityPost
.
Prior to creating a live stream post, it is crucial to create the live stream that will be included in the post data to ensure that the necessary information is accessible and can be linked to the post. This requires creating the live stream first, to obtain the data that will be used in creating the live stream post. For more information regarding live stream, please refer to #live-stream
As demonstrated in the code sample below, here's a way to create a live stream.
Upon successful completion of the live stream process, you can include the stream ID as a parameter when creating a live stream post, as demonstrated in the code sample below.
Here's an explanation of the method's parameters:
text
: This is a required parameter of type String
, which represents the text content of the new post. You can pass in any text you want to include in the post, up to a maximum length of 20,000 characters.
streamId
: The ID of the created live stream to include in a post.
targetType
- Type of the target, either a particular community or a user feed.
tags
- Arbitrary strings that can be used for defining and querying for the posts.
metaData
- Additional properties to support custom fields.
You can create a livestream post via AmityLiveStreamPostBuilder
.
AmityLiveStreamPostBuilder
creates a text post and attaches a stream post as a first child. This builder requires the stream object id.
We can build the post first by using AmityLiveStreamPostCreator.Builder
. Then, use the same createPost
method in AmityPostRepository
and pass the streamId
from created AmityStream
to create a livestream post.
Version 6
Beta (v0.0.1)
In Amity's social SDK, posts with images, files, or videos follow a Parent-Child relationship, where each uploaded image/file is represented as a separate child post. When creating an image/file post, any text that is set will act as the Parent post. The Parent post contains a child posts property, which provides an array of AmityPost instances for each child post. For more information about post structure, please refer to - #post-structure
Each instance of a Post holds several pieces of information, including data, reactions, comments, metadata, child posts, and more. For text posts, you can access the actual data of the post through the data property. Similarly, for child posts, developers can also access the data through the same data property. Additionally, more details about uploaded files and images can be accessed through the provided functions; such as getFileInfo()
or getImageInfo()
.
To illustrate this concept, consider a post that contains both text and an image. In this case, the parent post would be a text post, and its child post would be an image post. By accessing the child posts property of the parent post, you can easily access and manage the child post information, allowing for a more flexible and efficient approach to managing posts in social applications.
Posting visual content such as photos, graphics, or images is facilitated by this type of post. The maximum size for an image is 1 GB, and the image will be automatically transformed into four different sizes for versatile usage which are:
Small
Medium
Large
Full
This allows for flexible usage and easy integration into various social applications. For more information about an image, please refer to the page - Image Handling.
Supported ✅ (Please wait while we prepare a real example!)
There are two ways to download the uploaded image.
Using FileRepository
FileRepository
class provides dedicated downloadImage(..)
method to download images uploaded using same class.
Note: This class does not perform any kind of caching for downloaded image. Please refer to header docs for download method for more details.
Using any third party library or your own implementation
You can download the file / image directly from provided fileUrl
using your own implementation or any custom third party libraries of your choice.
Supported ✅ (Please wait while we prepare a real example!)
If you are using your own implementation to download image of appropriate size, you need to construct the download url yourself by appending size
query parameter.
For example, to download a small image:
provided URL: https://my-image-download-link-from-amity/123/456
with size query parameter: https://my-image-download-link-from-amity/123/456?size=small
Value for Size
query parameters can be: small, medium, large, or full.
This is a post that contains a file attachment, such as a PDF, a Word document, or any other type of file. This is a useful type of post for sharing files within a channel, such as a document or a photo. The maximum size for a file is 1 GB. For more information about a video file, please refer to the page - File Handling
This is a useful type of post for sharing video content within a feed, such as a short clip or a longer video. The maximum size for a video is 1 GB, and the video will be automatically transcoded into different resolutions for versatile usage which are
1080p
720p
480p
360p
original
Once you uploaded a video the videos undergo transcoding from their original resolution. You can quickly access the original size of the video right after you make the video post. However, it takes time for the transcoded resolutions to be ready. This allows for flexible usage and easy integration into various social application. For more information about a video file, please refer to the page - Video Handling.
Live stream posts offer an effective means of creating captivating and interactive content that engages users and promotes deeper connections among them. The Amity Social SDK enables developers to swiftly integrate live stream posts into a social feed, allowing them to share their real-time experiences with other users on the platform. For more information about live stream, please refer to the page - Video.
Supported ✅ (Please wait while we prepare a real example!)
To implement poll functionality in posts, developers can leverage the existing poll features in Amity SDK and integrate them into posts. Polls can be created as child posts within the post thread, with the poll data and options easily accessible to users. Users can then participate in the poll by selecting their preferred option, and the results can be displayed in posts. For more information about live stream, please refer to the page - Poll.
The Post Impression feature in our Amity Social Cloud SDK is a tool designed to collect valuable data regarding post interactions for analytics and reporting purposes. This feature empowers users to gain insights into how their content is performing and who is actively engaging with it. With this feature, users can mark specific posts as viewed and access information about impressions, reach, and the list of users who have viewed each post.
Impressions represent the number of users who viewed the post, while reach represents the number of unique users who viewed the post. Please keep in mind that post impression data won't be updated in real-time but rather almost in real-time.
The SDK provides an ability to mark any post as viewed by invoking markAsViewed()
method within post.analytics
, which will increase the impression and reach count of specific posts. Additionally, users can easily access the impression
and reach
counts directly from the post
object within the SDK.
The SDK provides an ability to query a list of unique users who have viewed the specific post. This functionality is available through invoking getViewedUsers(postId)
within the UserRepository
and will return the live collection of user objects.
In Amity's social SDK, there are two types of post deletion: soft delete and hard delete. When a post is soft deleted, it is simply marked as deleted, with the isDeleted
flag set to true
in the database. The post still exists in the database, but is no longer visible to users. By contrast, when a post is hard deleted, all associated data, including reactions, comments, child posts, and related data, is permanently removed from the database. This makes it impossible to retrieve the data once it has been hard deleted.
To perform a hard delete, developers can pass a boolean value of true to the delete post method in the PostRepository. For a soft delete, the boolean value should be false. If no deletion type is specified, the default is soft deletion. By offering these two types of post deletion, Amity's social SDK provides developers with flexibility and control over managing their posts and associated data.
Version 6
Beta (v0.0.1)
Only the owner of the post or an admin can update and/or delete a post.
Hard deletion is only supported via the SDK at this time, and not yet available in the UIKit or Console. To delete a post in Amity's social SDK, developers can use the PostRepository and specify the post ID and the desired deletion type.
Please also note that the file in the post will not be automatically deleted when the post is deleted.
The SDK provides a way for users to report or flag a post as inappropriate using the flag
method.
This method allows users to notify the community moderators or admins about posts that they believe violate the community guidelines or are otherwise inappropriate. By flagging a post, users can help ensure that the community remains a safe and welcoming place for all members.
This method allows users to quickly determine whether they have previously flagged a post as inappropriate or not. To use this method, users can call the isFlaggedByMe
method with the postId
as a parameter. The method will then return a boolean value indicating whether or not the post has been flagged by the current user.
This method allows users to retract their earlier report if they believe that the flagged post no longer violates the community guidelines or if they mistakenly reported the post. By unflagging a post, users can help ensure that the community moderators or admins can focus their attention on other reported posts that may still require attention.
Mentions allow users to tag other users in posts. It's a powerful tool for fostering engagement and collaboration within your social application. With mentions, users can easily notify specific individuals or groups to new content or important updates. In the SDK, mentions can be implemented in a range of ways, depending on your application's needs and user experience. For more information about mentions, please refer to .
You can easily mention users when creating a post by including their user IDs in the mention user parameter as well as defining metadata for mention rendering. For further explanation, please refer to .
Version 6
Beta (v0.0.1)
In this example, we show a text post with mention. However the pattern of adding mention to a post; is the same for all post types. You can apply the same creation process to the desired post type.
We provide developers with an efficient method for updating posts with mentions of specific users, you can easily add mentions to their post updates and but it will not notify the relevant users.
To remove mentions you can provide an empty JSON object for the metadata parameter, and an empty list for the mention users parameter. By doing so, You can easily remove mentions from the post content, while ensuring that the overall structure of the post remains intact.
When updating a text or video post with mentions, you can provide the JsonObject
for the metadata
parameter and provide the list of userId
for the mentionUsers
parameter.
Supported ✅ (Please wait while we prepare a real example!)
Version 6
Beta (v0.0.1)
Editing and changing post details and content
Amity SDK supports the editing of the following post types:
Text post
Image post
File post
Video post
Amity Social SDK provides a post editing functionality that fosters accountability and user awareness within your application. This feature enables users to edit their own posts exclusively. Users can only edit their own posts, except that you're an admin or a moderator of a particular community. The functionality encourages responsible interactions and maintains accountability. Upon completing an edit operation, the SDK updates the editedAt
property to the current time, reflecting the changes made by the user. You can then leverage the updated editedAt
timestamp to create a user interface that informs users of edited posts, fostering transparency. You can edit a post by follow this sample code.
You can edit a post using a pattern similar to creating a post. Follow these steps:
Choose the appropriate post builder type and structure your post.
Make the API call for post editing.
Note: If you intend to update files, images, or videos in a post, you must upload them first. Once you have the data, you can use it with the corresponding post type. Ensure that the builder type matches the original post type.
For further details on uploading, refer to .
To edit a text post, utilize the editPost
method in a post repository using AmityTextPostBuilder
class to compose a new text as demonstrated in the provided code snippet.
To edit a file post, utilize the editPost
method in a post repository using AmityFilePostBuilder
class to compose a set of new files as demonstrated in the provided code snippet. The files
parameter should include both the current files (if required) and any newly uploaded files you wish to append to the post.
To edit an image post, utilize the editPost
method in a post repository using AmityImagePostBuilder
class to compose a set of new images as demonstrated in the provided code snippet. The images
parameter should include both the current images (if required) and any newly uploaded images you wish to append to the post.
To edit a video post, utilize the editPost
method in a post repository using AmityVideoPostBuilder
class to compose a set of new videos as demonstrated in the provided code snippet. The videos
parameter should include both the current videos (if required) and any newly uploaded videos you wish to append to the post.
If you want to edit a file/image/video post to add more files, the files/images to be added must be uploaded first. The AmityFileRepository
class handles the uploading and downloading of files. The repository has an uploadFile
method which takes the file's Uri
and returns an array of AmityUploadResult
for successful or failed uploads.
AmityUploadResult
will return four possible types of data:
AmityUploadResult.PROGRESS
- uploading is in progress. It returns AmityUploadInfo
which can be used to track the progress of the upload.
AmityUploadResult.COMPLETE
- the upload completed successfully. It returns AmityFile
that can then be attached to the post.
AmityUploadResult.ERROR(exception)
- the upload failed. It returns an Exception
.
AmityUploadResult.CANCELLED
- uploading is canceled.
To edit a file post, use the edit
method as shown in the sample code below. The attachments
should contain the uploaded files that you want to add to the post which are stored in existingFiles
and newFiles
respectively.
To edit an image post, use the edit
method as shown in the sample code below. The attachments
should contain the existing images and the uploaded images that you want to add to the post which are stored in existingImages
and newImages
respectively.
You can remove existing images from the post by excluding them from the attachments
list. You can also change the order of the images in the list.
To edit a video post, use the edit
method as shown in the sample code below. The attachments
should contain the existing videos and the uploaded videos that you want to add to the post which are stored in existingVideos
and newVideos
respectively.
This method requires the following parameters:
postId (String)
- ID of the post to update
data (Object)
- data object of the post
Other optional parameters are:
metadata (Object)
- the metadata object of the post
tags (Array.<String>)
- strings used to query the post. Up to five tags can be added and each tag can be up to 24 characters long.
In JavaScript SDK, the following are not yet supported:
Adding videos to a non-video post (e.g. text post, image post)
Adding different media types (e.g. image, custom files) in a single post
The updatePost
method returns a Promise<boolean>
- true
if the post is successfully updated. Otherwise, it will throw an error.
You can add new videos or remove existing ones from a video post. In adding new videos, you must first upload the videos that you will add to the post. Refer to Upload Video for the details on how to upload a video.
When updating a video post, provide the file ID of the video and the type FileType.Video
in the attachments
parameter. Modifying attachments
array will overwrite the existing videos so it’s recommended to include original attachments if you want to retain the original videos in the post. Leave the attachments
array empty to remove all videos.
Version 6
Beta (v0.0.1)
When updating a post, you can update its text content. However, you cannot add or remove the post's attachments (i.e. image, video, and file).
You can update the post using the update
method. This method requires the following parameters:
postId (String)
- ID of the post to update
text (String)
- text data of the post
You can upload a maximum of ten images/files in a single post.
To render mentions in a supported feature, please refer to , specifically the section on handling mentions. This documentation provides detailed information on how to represent mentions in your application, including information on metadata structure, custom mention objects, and rendering support.
For further details on uploading, refer to .
To provide better control and moderation over community posts, the Amity SDK includes a feature that allows community owners to review and approve posts before they appear on the community's feed. This feature allows for a more streamlined and organized approach to managing community content. With Post Review enabled, any post created within a community will first be placed in a Reviewing feed. After approval, it will be moved to the Published feed, while declined posts will be moved to the Declined feed.
reviewing
- when a post is created in a community with Post Review enabled, it is initially placed in the Reviewing feed.
published
- If a post is approved by a moderator or creator, it is moved to the Published feed.
declined
- If a post is declined by a moderator or creator, it is moved to the Declined feed.
Supported ✅ (Please wait while we prepare a real example!)
The AmityPost
object within the Amity SDK provides a method that allows users to retrieve the feed type of a post by calling post.getFeedType()
. This method enables developers to easily determine the current feed that a post belongs to. Understanding the feed type of a post is important for implementing moderation features, as different feeds have different access and permission levels.
Supported ✅ (Please wait while we prepare a real example!)
Supported ✅ (Please wait while we prepare a real example!)
Within the Amity SDK, there are methods available to moderators and creators of a community that allows them to approve or decline posts.
By calling the method, the selected post will be approved and will appear on the community's feed.
Version 6
Beta (v0.0.1)
By calling the method, the selected post will be declined and will disappear from the community's reviewing feed.
Version 6
Beta (v0.0.1)
To retrieve a list of posts from the Reviewing feed, users with the AmityPermission.REVIEW_COMMUNITY_POST
can retrieve all posts, while users without this permission can only retrieve their own reviewing posts. Users without moderation permissions will receive only posts they created for the Reviewing and Declined feeds.