Foren
Neue Beiträge
Foren durchsuchen
Was ist neu?
Neue Beiträge
Profilnachrichten
Online
Anmelden
Registrieren
Aktuelles
Suche
Suche
Nur Titel durchsuchen
Von:
Neue Beiträge
Foren durchsuchen
Menü
Anmelden
Registrieren
App installieren
Installieren
Programmierung
HTML
TikTok User Live Status mit Bild
JavaScript ist deaktiviert. Für eine bessere Darstellung aktiviere bitte JavaScript in deinem Browser, bevor du fortfährst.
Du verwendest einen veralteten Browser. Es ist möglich, dass diese oder andere Websites nicht korrekt angezeigt werden.
Du solltest ein Upgrade durchführen oder einen
alternativen Browser
verwenden.
Auf Thema antworten
Beitrag
[QUOTE="Netboss007, post: 13397, member: 4573"] Hallo Ihr lieben, ich probiere und probiere und bekomme keine Ausgabe. Findet Ihr den Fehler? Benötige dringend Hilfe. <!doctype html> <html> <head> <title>TikTok User Live Status 2.0</title> <style> .user-info { display: flex; align-items: center; } .profile-picture { width: 48px; height: 48px; border-radius: 24px; margin-right: 8px; } .live-status { font-weight: bold; } </style> </head> <body> <h1>TikTok User Live Status</h1> <div id="user-info-container"></div> <script> // Replace these values with your TikTok API credentials const clientId = '7175438664603060230'; const clientSecret = '4f15bb1ad014b81cb920ef390bb9bd9c'; // Replace this value with the username of the TikTok user const username = 'Katrin'; // Get an access token from the TikTok API fetch('[URL]https://openapi.tiktok.com/oauth2/access_token[/URL]', { method: 'POST', headers: { 'Content-Type': 'application/x-www-form-urlencoded', }, body: `client_key=${clientId}&client_secret=${clientSecret}&grant_type=client_credentials`, }) .then((response) => response.json()) .then((data) => { // Extract the access token from the API response const accessToken = data.access_token; // Get the user's live status from the TikTok API return fetch( `[URL]https://openapi.tiktok.com/v2/live/user/status?user_name=$[/URL]{username}`, { method: 'GET', headers: { Authorization: `Bearer ${accessToken}`, }, } ); }) .then((response) => response.json()) .then((data) => { // Extract the user's live status and user ID from the API response const liveStatus = data.is_live; const userId = data.user_id; // Get the user's profile picture from the TikTok API return fetch [/QUOTE]
Zitate
Authentifizierung
Antworten
Programmierung
HTML
TikTok User Live Status mit Bild
Oben
Unten