Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dustinrouillard/tiktok-embeds
Generates OpenGraph meta tags and gets the video file for Tiktoks from their share urls
https://github.com/dustinrouillard/tiktok-embeds
discord embeds tiktok
Last synced: about 2 months ago
JSON representation
Generates OpenGraph meta tags and gets the video file for Tiktoks from their share urls
- Host: GitHub
- URL: https://github.com/dustinrouillard/tiktok-embeds
- Owner: dustinrouillard
- License: mit
- Created: 2021-08-24T20:56:13.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2024-03-30T00:27:32.000Z (9 months ago)
- Last Synced: 2024-11-01T06:34:13.294Z (2 months ago)
- Topics: discord, embeds, tiktok
- Language: TypeScript
- Homepage: https://vm.dstn.to/@evacudmore/video/6994080818792582405
- Size: 235 KB
- Stars: 22
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# TikTok Share Embeds
This generates an OpenGraph embed for a tiktok from the following url formats
- `https://vm.tiktok.com/ZMRjsP94a`
- `https://tiktok.com/@momma_mandy_plus7/video/6992363023767850246`Right now the embeds are confirmed working in Discord, and Telegram.
Runs in Cloudflare Workers, deployed with Wrangler, makes it snappy.
## Link usage
Going to the direct link will return the video
This link will return the metatags for the discord embed if the useragent contains Discord, then within the meta tags the url for the video is the following (which is required to have .mp4 at the end and used to return the video even if discord's user agent)
## Demo
![Discord Usage GIF](https://files.dstn.to/2c0f5c0bec98589e.gif)
This is my bot detecting that a tiktok link was sent and just sending a message with the link using the worker host to auto embed it.
The repo for this bot is [here](https://dstn.to/tt-discord-embeds) if you'd like to run it yourself.