CommentoScriptConfigurazione
本页介绍用于Attività创建的 comment Script的Configurazione参数。
Panoramica
comment Script用于Automatico在 TikTok 或 Instagram 帖子上PubblicaCommento。当您通过 API 提供多个目标帖子 URL 时,Ogni个目标帖子 URL 创建一个Attività。您可以Utilizzo start_time 参数控制Ogni个Attività的Esegui时间。
ScriptConfigurazione (script_config)
script_config 对象包含CommentoScript的参数。以下SìDisponibile的参数:
参数
| 参数 | 类型 | Obbligatorio | Predefinito值 | Descrizione |
|---|---|---|---|---|
| target_post_urls | string[] | Sì* | [] | 要Commento的目标帖子 URL 数组(Ogni个 URL 一个Attività) |
| target_post_url | string | Sì* | "" | 单个目标帖子 URL 或用换行符/逗号分隔的多个 URL |
| comment_content | string | Sì | "" | Commento文本Contenuto。可以包含用换行符分隔的多条Commento |
| comment_order | string | No | "random" | 如何选择Commento:random(Casuale)或 sequential(顺序) |
| insert_emoji | boolean | No | false | Vuoi在Commento中插入Casuale表情符号 |
| comment_image_path | string | No | "" | 图片Commento的图片文件路径(仅限 TikTok)。Supporto绝对路径或相对于 work_dir/upload/ 的相对路径 |
Richiesto提供 target_post_urls 数组或 target_post_url 字符串。如果两者都提供,target_post_urls 优先。
comment_image_path 参数允许您在Commento中附加图片。此Funzionalità仅在 TikTok 上Supporto - Instagram Commento不Supporto图片附件。图片将被推送到Dispositivi并作为图库中的第一张图片被选择。
当提供多个目标帖子 URL 时,API 会 为Ogni个目标帖子 URL 创建一个Attività。例如,如果您指定 3 个帖子 URL 和 2 个Dispositivi,将创建 6 个Attività。Utilizzo start_time 参数控制Attività开始Esegui的时间。
Esempio
Commento单个帖子
curl -X POST http://localhost:50809/api/v1/task \
-H "Content-Type: application/json" \
-d '{
"serials": ["device_serial_1"],
"script_name": "comment",
"script_config": {
"target_post_url": "https://www.tiktok.com/@username/video/1234567890",
"comment_content": "精彩内容!🔥"
}
}'
Utilizzo多个Commento选项
提供用换行符分隔的多条Commento。系统将根据 comment_order 选择其中一条:
curl -X POST http://localhost:50809/api/v1/task \
-H "Content-Type: application/json" \
-d '{
"serials": ["device_serial_1"],
"script_name": "comment",
"script_config": {
"target_post_url": "https://www.tiktok.com/@username/video/1234567890",
"comment_content": "视频太棒了!\n喜欢这个内容!\n继续加油!👏\n真的很不错!",
"comment_order": "random"
}
}'
Commento多个帖子
当Commento多个帖子时,Ogni个帖子创建一个Attività:
curl -X POST http://localhost:50809/api/v1/task \
-H "Content-Type: application/json" \
-d '{
"serials": ["device_serial_1"],
"script_name": "comment",
"script_config": {
"target_post_urls": [
"https://www.tiktok.com/@user1/video/111",
"https://www.tiktok.com/@user2/video/222",
"https://www.tiktok.com/@user3/video/333"
],
"comment_content": "好视频!\n太棒了!\n喜欢!",
"comment_order": "sequential"
}
}'
这将创建 3 个立即Esegui的独立Attività。
定时Commento
Utilizzo start_time 安排Attività开始Esegui的时间:
curl -X POST http://localhost:50809/api/v1/task \
-H "Content-Type: application/json" \
-d '{
"serials": ["device_serial_1"],
"script_name": "comment",
"script_config": {
"target_post_url": "https://www.tiktok.com/@username/video/1234567890",
"comment_content": "定时评论!"
},
"start_time": "14:30"
}'