---
title: "TikTok Live - s&box library"
description: "A simple library that allows you to develop experiences that integrate with TikTok Live"
canonical: "https://sbox.watch/zh-cn/libraries/minima/tiktoklive/"
generated_at: "2026-11-27T18:26:25.877Z"
---

# TikTok Live

A simple library that allows you to develop experiences that integrate with TikTok Live

- 类型: 库
- 标识符: minima.tiktoklive
- 创作者: Minima
- 规范地址: https://sbox.watch/zh-cn/libraries/minima/tiktoklive/
- Markdown: https://sbox.watch/zh-cn/libraries/minima/tiktoklive/index.md
- sbox.game: https://sbox.game/minima/tiktoklive/
- 生成时间: 2026-11-27T18:26:25.877Z

## 统计

- 24小时热度: +0
- Terry 评分: --
- 收藏: 0
- 好评: 0
- 差评: 0
- 更新时间: 2025年5月25日
- 创建时间: 2025年5月24日
- 大小: 25.6 KB
- 文件: 22
- 标签: api, stream, tiktok, utilities, utils

## 描述

TikTok Live
Simple library that allows you to subscribe to various TikTok Live events via a EulerStream web socket connection.
Have requests, questions, or concerns?

To Get Started:
- Add the TikTokLiveConnector component to your game
- Set the ttl\_uri ConVar to a EulerStream WebSocket URI- It should roughly look like wss://ws.eulerstream.com?uniqueId=tv\_asahi\_news&apiKey=API\_KEY\_HERE

- Run the Game

Example Component:
using Minima.TikTokLive;

public class TikTokExample: Component, ITikTokLiveEvents {
 void ITikTokLiveEvents.OnChat( WebcastChatMessage msg ) {
 if ( msg.User is not {} user )
 return;

 Log.Info($"\[{user.Nickname}\]: {msg.Comment}" );
 }

 void ITikTokLiveEvents.OnGift( WebcastGiftMessage msg ) {
 if ( msg.User is not {} user || msg.GiftDetails is not {} giftDetails )
 return;

 Log.Info($"\[{user.Nickname}\] sent a gift {giftDetails.GiftName} worth {giftDetails.DiamondCount} diamonds" );
 }

 void ITikTokLiveEvents.OnLike( WebcastLikeMessage msg ) {
 if ( msg.User is not {} user )
 return;

 Log.Info($"\[{user.Nickname}\] liked the stream {msg.LikeCount} times." );
 }

 void ITikTokLiveEvents.OnSubNotify( WebcastSubNotifyMessage msg ) {
 if ( msg.User is not {} user )
 return;

 Log.Info($"\[{user.Nickname}\] subscribed to the stream." );
 }

 void ITikTokLiveEvents.OnSocialMessage( WebcastSocialMessage msg ) {
 if ( msg.User is not {} user )
 return;

 if ( msg.MessageKind == WebcastSocialMessage.Kind.Follow )
 Log.Info($"\[{user.Nickname}\] followed the stream." );
 else if ( msg.MessageKind == WebcastSocialMessage.Kind.Share )
 Log.Info($"\[{user.Nickname}\] shared the stream." );
 }

 void ITikTokLiveEvents.OnMemberMessage( WebcastMemberMessage msg ) {
 if ( msg.User is not {} user )
 return;

 if ( msg.MessageKind == WebcastMemberMessage.Kind.Join )
 Log.Info($"\[{user.Nickname}\] joined the stream." );
 }
}
