Nodes/MLTask_ComfyUI/Tiktok Poster Data
ComfyUI Node

Tiktok Poster Data

The TikTok form with the video cover math

By misterjoessef·Created 2 years ago·Updated 2 years ago· 1
Tiktok Poster Data
    • tiktok_data
    captiontiktok caption
    photo_titleTitle (for photo posts only)
    video_cover_timestamp_percent_from_0_to_10.00
    privacyPUBLIC_TO_EVERYONE
    users_can_commenttrue
    users_can_duettrue
    users_can_stitchtrue
    content_disclosure_enabledfalse
    content_disclosure_branded_contentfalse
    content_disclosure_your_brandfalse

    TiktokPosterData is the settings form for TikTok in the MLTask/SocialMan pack - and TikTok posts have more switches than most, which is why this node is the busiest of the platform forms. It doesn't publish anything itself; it builds a tiktok_data dictionary that SocialManPoster sends to MLTask's backend, which does the actual TikTok API call. TikTok is also the only platform here without an account dropdown - the backend uses your single connected TikTok account.

    The inputs are a genuine mix of the useful and the fiddly:

    • caption - the post text, multiline, default "tiktok caption." This is where hashtags go.
    • photo_title - a title, but note the default: "Title (for photo posts only)." If you're posting video, TikTok ignores it.
    • video_cover_timestamp_percent_from_0_to_1 - the cover-frame picker, expressed as a fraction. 0 means the start of the video, 1 means the end, 0.5 the middle. When the poster runs, it multiplies this by the actual video duration (via ffprobe) to get a timestamp in milliseconds. The node validates the value is between 0 and 1 inclusive and raises otherwise. For image posts the value stays 0 - there's no video to pick a frame from - and if ffprobe isn't on your system, the duration lookup returns nothing and the poster throws instead of guessing. Keep ffmpeg installed for TikTok video posts.
    • privacy - four choices: PUBLIC_TO_EVERYONE (default), FOLLOWER_OF_CREATOR, MUTUAL_FOLLOW_FRIENDS, SELF_ONLY. Yes, the values are shouty API constants, not friendly labels.
    • users_can_comment / users_can_duet / users_can_stitch - all default to true. Flip them off if you don't want your AI generation getting duetted on, which is a real consideration when posting generated content.
    • content_disclosure_enabled and the two sub-flags - content_disclosure_branded_content and content_disclosure_your_brand - TikTok's AI/branded-content disclosure toggles. All default off.

    The single output, tiktok_data, feeds SocialManPoster's tiktok_data input. The most useful habit: because TikTok is where your cover frame lives, pair this node with a video source (VHS_VideoCombineSocialManMediaToPoster) and set the cover percent to something like 0.1–0.2 so the thumbnail isn't a black first frame. And keep content_disclosure_enabled in mind - TikTok is one of the platforms actively enforcing AI-content labels, and leaving it off can get your post flagged after the fact.

    Mechanically it's a pure data bag: validate the cover percent, pack all the toggles, hand the dict to the poster. Everything else - uploading the video, computing that cover timestamp from the real file duration, talking to TikTok's API - happens in SocialManPoster and on MLTask's servers. So the token, the password, and the subscription requirements all come from that node. No token means a dialog, not a post.

    Installing it

    Part of the MLTask_ComfyUI pack. ComfyUI Manager: search MLTask_ComfyUI, install, restart; or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/misterjoessef/MLTask_ComfyUI
    

    Dependencies are requests and aiohttp; the only non-Python piece is ffprobe (ships with ffmpeg) for the cover-timestamp math. The pack README's video tutorial shows the full workflow, and it's worth a look just to see TikTok and YouTube nodes side by side, because TikTok is the one where those content-disclosure flags actually matter.

    CategoryMLTask/SocialMan

    Inputs (10)

    NameTypeDefaultDescription
    captionoptSTRINGtiktok caption
    photo_titleoptSTRINGTitle (for photo posts only)
    video_cover_timestamp_percent_from_0_to_1optFLOAT0.00
    privacyoptCOMBOPUBLIC_TO_EVERYONE4 options: FOLLOWER_OF_CREATOR, MUTUAL_FOLLOW_FRIENDS, PUBLIC_TO_EVERYONE, SELF_ONLY
    users_can_commentoptBOOLEANtrue
    users_can_duetoptBOOLEANtrue
    users_can_stitchoptBOOLEANtrue
    content_disclosure_enabledoptBOOLEANfalse
    content_disclosure_branded_contentoptBOOLEANfalse
    content_disclosure_your_brandoptBOOLEANfalse

    Outputs (1)

    NameTypeDescription
    tiktok_dataMLT_SM_TIKTOK_DATA