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.