frankvHoof93 / TikTokLiveSharp

Port of TikTok live library for C#
https://vanhoof.dev
Other
155 stars 31 forks source link

Urgent!!! #8

Closed prolove15 closed 1 year ago

prolove15 commented 1 year ago

Hello. I am Unity game developer and I am making game for Tiktok live stream. The sample game link is same with below.

https://www.tiktok.com/@guess_the_word_game/live?enter_from_merge=others_homepage&enter_method=others_photo&lang=en-EN

But I don't know well how to implement it. Now, the gameplay was completed, but I don't know how to receive gifts, user avatars and display names. I can't understand how to use this TiktokLiveSharp project. So, someone teach me or share a tutorial video. Thank very much.

frankvHoof93 commented 1 year ago

There's a sample-project here: https://github.com/frankvHoof93/TikTokLiveSharp/tree/main/TikTokLiveUnity/Samples~/Example That explains how to use the project.

prolove15 commented 1 year ago

Thanks for your interest

I already used the sample project above before posting the issue. However, after entering my username, nothing happened.

Excuse me, I have a couple of questions I'd like to ask, so please teach me.

(1) Is it right to enter the user name to the Input panel? my user name is 'brightlight1115'.

(2) Are there any specific requirements to receive gift events from Tiktok? I just signin to the Tiktok and have not anything such as Likes, Followers, Comments, Gifts etc. In this condition, can I use this library to receive above events without any approval of Tiktok?

May I ask an invite on Discord? I would really appreciate it if you could invite me. My Discord user name: blight#0928.

Thank you.

frankvHoof93 commented 1 year ago

(1) you need to enter the @-name as it appears in the url. i.e. https://www.tiktok.com/@USERNAME/live (2) this library is only for active livestreams (not for normal tiktok accounts or pages). It does not require any approval from TikTok outside of the permission to go live with your account (which I believe requires at least 1000 followers). The stream needs to be active before you attempt to connect.

prolove15 commented 1 year ago

Wonderful, you seems to be an experienced developer.

Can I get his/her avatar and user name, while viewer send the gift on my live stream game?

frankvHoof93 commented 1 year ago

The giftmessage ( https://github.com/frankvHoof93/TikTokLiveSharp/blob/main/TikTokLiveSharp/Events/Messages/GiftMessage.cs ) includes a User-object ( https://github.com/frankvHoof93/TikTokLiveSharp/blob/main/TikTokLiveSharp/Events/Objects/User.cs ) under 'Sender' that has this info. The avatar comes in the form of a (set of) URL(s). You'll need to download the Image from that data. TikTokLiveUnity includes a helper-class ( https://github.com/frankvHoof93/TikTokLiveSharp/blob/main/TikTokLiveUnity/Runtime/Utils/TextureCache.cs ) that will allow you to easily do this. It is also available via the TikTokLiveManager (via the 'RequestImage/Sprite methods)

prolove15 commented 1 year ago

Is this library interact with Tiktok's API? If so, please let me know Tiktok API document link.

frankvHoof93 commented 1 year ago

As stated in the readme: there is no API documentation. The entire thing is reverse engineered, as TikTok does not provide any documentation for their livestream services

MikeStutje commented 1 year ago

Seems like an unity skill issue to me tbh. Just watch tutorials on youtube about unity man. @BrightLight1115A

prolove15 commented 1 year ago

Hello, have a wonderful day. I didn't yet implement the functionality of Tiktok live stream. There is a video that captured my action for Tiktok live stream game. When I press the connecting button in Tiktok sample scene, some errors occured. Please check it and help me how do I fix these errors.

This is share link of video. https://drive.google.com/file/d/1ObHaM7MjevvdGZzjzMwQ218ni7iqCI5n/view?usp=share_link

frankvHoof93 commented 1 year ago

HTTPExceptions will always be either an issue with your network-connection, or the Signing server (managed by owner of the Python lib) being ddos'ed