This commit is contained in:
nadja
2026-11-01 20:14:25 +01:00
parent 828c38c779
commit c4685c2152
1686 changed files with 570761 additions and 560 deletions

15
backend/dist/services/tiktok.js vendored Normal file
View File

@@ -0,0 +1,15 @@
export async function getTikTokData(url) {
const oembedUrl = `https://www.tiktok.com/oembed?url=${encodeURIComponent(url)}`;
const response = await fetch(oembedUrl);
if (!response.ok) {
throw new Error(`TikTok oEmbed Fehler: ${response.status}`);
}
const data = await response.json();
return {
title: data.title || '',
author: data.author_name || '',
authorUrl: data.author_url || '',
thumbnail: data.thumbnail_url || '',
embedHtml: data.html || '',
};
}