Skip to content

pugson/telegram-twitter-url-expand-bot

Repository files navigation

Link Expander — Telegram Bot for expanding Twitter, Instagram, Hacker News, and TikTok links.

banner-4 1@1x

Some Twitter links stopped expanding inside Telegram which made it extremely annoying when you wanted to send a banger tweet to your homies in the group chat. This bot replies with an alternative fxtwitter.com URL which has a working embed for multiple photos and even includes inline video.

Supports Hacker News links! (not in channels yet)

You can now expand Hacker News links. It will reply with the original YCombinator URL, the link shared in a HN post, and the title of the submission.

CleanShot 2024-01-09 at 09 15 18 PM@2x

✨🆕✨ Bot now works in Telegram Channels!

When you add this bot to your channel it will automatically edit any message that includes a Twitter, Instagram, or TikTok link and replace the link in that message with a link to fxtwitter.com, ddinstagram.com, or tfxktok.com which have working embeds for each platform. Your channel subscribers will finally be able to watch inline videos and photos without leaving Telegram.

Also supports Posts.cv!

The bot will expand posts.cv links inside Telegram. It will reply with a link to postscv.com which has a working embed for posts.cv posts so you can see them play inline inside Telegram.

Also supports TikTok!

The bot can now expand TikTok videos inside Telegram. It will reply with a link to tfxktok.com which has a working embed for TikTok videos so you can see them play inline inside Telegram.

Also supports Instagram!

You can now expand Instagram links inside Telegram with this bot. It will reply with a link to ddinstagram.com which has a working embed for multiple photos and even includes inline video. Works with regular Instagram Posts and Reels. Doesn’t work with Stories or Highlights yet.

Note

There is no message logging or personal tracking — your chats stay private.

The exact source code that’s published on GitHub is automatically deployed to Railway and logs will never include any user/chat/personal info or content. You can audit the code to see for yourself.

Demo

CleanShot.2022-07-31.at.06.42.55.PM-converted-converted.mp4

How to use this bot?

Channels

  1. Find it on Telegram as @TwitterLinkExpanderBot or click here: https://t.me/twitterlinkexpanderbot?start=start
  2. Add it to your channel as admin with the Edit messages of others permission.
  3. Send a message that includes a tweet, TikTok, or Instagram URL.

Groups or DMs

  1. Find it on Telegram as @TwitterLinkExpanderBot or click here: https://t.me/twitterlinkexpanderbot?start=start
  2. Add it to your group chat.
  3. Send a message that includes a tweet, TikTok, or Instagram URL.
  4. Click "Yes" or "No" when the bot replies to your message.
  5. Configure automatically expanding links in your group chat by sending /autoexpand and changing your settings.

image

Do you read all messages inside the chat?

🙅‍♂️ No, I will never do that. 🙅‍♂️

While it is technically possible through the Bot API, I simply do not have the time or desire to snoop on your shit. The only thing I will keep track of is counting anonymous events when buttons are clicked, bot commands are used, a tweet has multiple images (etc.) to monitor stats to see if people are finding this bot useful.

image

Thanks

This bot wouldn't be possible without the following people and projects. Huge thanks to: