l3d00m / TwitterToReddit

OUTDATED, see issue #1 - Simple python bot that crossposts Tweets to reddit

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Twitter to Reddit

Simple python bot that crossposts tweets with a specific hashtag/user to reddit

Setup

Add a constants.py file in the subdirectory that looks like the following and add your keys.

global reddit_client_id
global reddit_client_secret
global reddit_client_refresh
global twitter_consumer_key
global twitter_consumer_key_secret

# From here: https://apps.twitter.com/app/new
twitter_consumer_key = ''
twitter_consumer_key_secret = ''

# From here: https://www.reddit.com/prefs/apps/
reddit_client_id = ''
reddit_client_secret = ''
reddit_redirect_uri = ''
reddit_client_refresh = '' # Look below how to get the refresh token

Get reddit refresh token

Just follow the steps on this site, which I find super helpful. The needed scope is submit.

Alternatively here is the provided tutorial by the praw-Library

Run the bot

python main.py

About

OUTDATED, see issue #1 - Simple python bot that crossposts Tweets to reddit

License:MIT License


Languages

Language:Python 100.0%