Sign inSign up

salarn14/telegram-twitter-forwarder-bot

By salarn14

•Updated about 8 years ago

forked from https://github.com/franciscod/telegram-twitter-forwarder-bot

Image
1

10K+

salarn14/telegram-twitter-forwarder-bot repository overview

⁠telegram-twitter-forwarder-bot

logo

Hello! This projects aims to make a Telegram⁠ bot that forwards Twitter⁠ updates to people, groups, channels, or whatever Telegram comes up with!

You can check it on Telegram: @SalarTwitterBot⁠

⁠Credit where credit is due

This is based on former work:

So, big thanks to anyone who contributed on these projects! :D

⁠How do I run this?

The code is currently targeting Python 3.5

# clone this thing
# create your virtualenv, activate it, etc
# virtualenv -p python3 venv
# . venv/bin/activate
pip install -r requirements.txt
# fill secrets.env (see next readme section)
source secrets.env
python main.py
⁠secrets.env?? u wot m8?

First, you'll need a Telegram Bot Token, you can get it via BotFather (more info here⁠).

Also, setting this up will need an Application-only authentication token from Twitter (more info here⁠). Optionally, you can provide a user access token and secret.

You can get this by creating a Twitter App here⁠.

Bear in mind that if you don't have added a mobile phone to your Twitter account you'll get this:

You must add your mobile phone to your Twitter profile before creating an application. Please read https://support.twitter.com/articles/110250-adding-your-mobile-number-to-your-account-via-web⁠ for more information.

Get a consumer key, consumer secret, access token and access token secret (the latter two are optional), fill in your secrets.env, source it, and then run the bot!

⁠Using Docker

set the vars in docker run command using -e (you can set the optional vars too), then ENJOY!!

docker run -d --name=twitter_bot --restart=always \
    -e TELEGRAM_BOT_TOKEN=<insert your telegram token> \
    -e TWITTER_CONSUMER_KEY=<insert your twitter consumer key here> \
    -e TWITTER_CONSUMER_SECRET=<insert your twitter consumer secret here> \
    -v twitter-data:/bot/ \
    salarn14/telegram-twitter-forwarder-bot

Tag summary

Content type

Image

Digest

Size

344.8 MB

Last updated

about 8 years ago

docker pull salarn14/telegram-twitter-forwarder-bot