Create engaging text posts with support for mentions, hashtags, and custom metadata. Text posts are the foundation of social interaction, perfect for sharing thoughts, updates, and conversations.

Rich Text Support

Up to 20,000 characters with mentions and hashtags

Flexible Targeting

Post to user feeds, communities, or your own timeline

Overview

Text posts provide a clean, straightforward way to share written content:
  • Text Support: Up to 20,000 characters per post
  • Mentions: Tag other users with @displayname syntax
  • Hashtags: Categorize content with #hashtag syntax
  • Custom Metadata: Add additional structured data
  • Flexible Targeting: Post to user feeds or communities

Parameters

ParameterTypeRequiredDescription
textStringText content (max 20,000 characters)
targetTypeEnumTarget type (user or community)
targetIdStringTarget ID (null for own feed)
tagsArray<String>Tags for categorization and search
metadataObjectCustom metadata for the post
mentionUsersArray<String>User IDs to mention in the post
let builder = AmityTextPostBuilder()
builder.setText("ABC")
// Create a post from builder
do {
    let post = try await postRepository.createTextPost(builder, targetId: nil, targetType: .user, metadata: nil, mentionees: nil)
} catch {
    // Handle error here
}

Best Practices

Troubleshooting

Common Use Cases

  • Status Updates: Share personal thoughts and experiences
  • Community Discussions: Start conversations in community feeds
  • Announcements: Broadcast important information
  • Questions: Ask for advice or opinions from followers
  • Storytelling: Share experiences and narratives
  • Links Sharing: Share URLs with context and commentary