Copy tweets from one Twitter channel to Telegram channel. Example of the result you can found here.
- work via Twitter API v2 (Essential mode)
- work via Telegram Bot API
- standalone solution
After start usage do not delete [#!n82an48]
-like ID from target Telegram channel description! By this ID the script track last imported tweet. If you remove it, import starts "from begin" (100 last tweets).
- Get Twitter API Bearer Token from here
- Go to @BotFather in Telegram and create a Bot to get
Access Token
- Setup to Bot for target channel next permissions:
Change channel info
andPost messages
- Create and fill
.env
based on.env.skel
(for local use) OR copy it's variables toSettings/Secrets/Actions
(GitHub) orConfig Vars
(Heroku) - For local use run the script by executing:
$ pip3 install -r requirements.txt
$ python3 twitter2telegram.py
# or `python3 repeater.py 60` to copy new tweets each 60 minutes
$ heroku create
$ git push heroku main
$ heroku open
or