Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fosslife/tg2twitter
Sending Tweets from your Telegram channel, because why not
https://github.com/fosslife/tg2twitter
telegram telegram-bot twitter twitter-api
Last synced: 7 days ago
JSON representation
Sending Tweets from your Telegram channel, because why not
- Host: GitHub
- URL: https://github.com/fosslife/tg2twitter
- Owner: fosslife
- Created: 2020-03-27T19:35:34.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2022-12-08T07:44:44.000Z (about 2 years ago)
- Last Synced: 2024-11-12T01:08:00.269Z (2 months ago)
- Topics: telegram, telegram-bot, twitter, twitter-api
- Language: Python
- Size: 23.4 KB
- Stars: 2
- Watchers: 4
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Telegram 2 Twitter bot
## Description
This bot lets you send a text message to any of your telegram channel, and then it will be automatically posted to
your Twitter account as well. Only text is supported as of now.## Installation
```
git clone https://github.com/fosslife/tg2twitter.git
``````
pipenv shell
pipenv install
```make a file called `.env`. Get following keys from respective developer account
```
TG_API_ID=''
TG_API_HASH=''TWITTER_CLIENT_KEY=''
TWITTER_CLIENT_SECRET=''TWITTER_ACCESS_TOKEN=''
TWITTER_ACCESS_TOKEN_SECRET=''CHANNEL_NAME=your_channel_name_or_id
```Getting twitter API keys is a Huge mess. I followed [this](https://python-twitter.readthedocs.io/en/latest/getting_started.html) tutorial
Then run the bot
```
python3 main.py
```## Usage
If bot runs successfully you need to sign in to your telegram account first. after that
just send a message with `.tweet` at the start. bot will automatically post that message
to your twitter
ex:
```
.tweet Hello Telegram and Twitter
```PS: just send this to channel, the bot will automatically delete this entire message
immedietly, remove the `.tweet` part from message automatically and post the original
text in both places.## TODO
- Make stringsession for easy deployments
- character limit