Post Creation Page
This page provides a form for post creation.

Text only



Text and Images

Device Camera

Device Image Gallery

Text and Files


Text and Videos

Polls
You can create a poll post and other users can interact with that poll post by selecting from the poll options.


Live Stream


To create a live stream post and for a detailed discussion on the live stream features, refer to Livestream Post documentation.
Features
Post creation
Create post by adding content such as text, images, videos, and files. Refer to Supported types for more details.
Mention in post
Mention users in post by typing @ to activate mention suggestion and selecting their names in the suggestion list. Up to 30 users can be mentioned per post.
An alert will be shown if character count is greater than 50000 or mentions count is greater than 30.
Supported types
File: All file types are supported
Image: JPG, JPEG, and PNG
Video: 3GP, AVI, FLV, MP4 and MPEG-2
Usage
Create a view controller
// Post to user feed
let viewController = AmityPostCreatorViewController.make(postTarget: .myFeed)
// Post to community feed
let viewController = AmityPostCreatorViewController.make(postTarget: .community(object: postModel))
// Poll post
let viewController = AmityPollCreatorViewController.make(postTarget: <your post target>)
self.present(viewController, animated: true, completion: nil)
Parameter
Parameter
Description
postTarget
enums to determine where is the target feed
consist of myFeed
and community(AmityCommunityModel)
Attachment options
By default AmityPostCreatorViewController
allows all attachments when creating a post. You can optionally choose attachment options when creating the post.
All available attachment options are image
, video
, and file
. These can be found in AmityPostAttachmentType
.
// Only allow file attachment in post creator page.
let settings = AmityPostEditorSettings()
settings.allowPostAttachments = [.file]
let postCreator = AmityPostCreatorViewController.make(postTarget: postTarget, settings: settings)
Last updated
Was this helpful?