All Projects → mobeets → twitter-bot-bootstrap

mobeets / twitter-bot-bootstrap

Licence: MIT license
Template for creating a twitter bot using python (twython) and heroku

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to twitter-bot-bootstrap

TgTwitterStreamer
Continous Integration from Twitter to Telegram.
Stars: ✭ 55 (+111.54%)
Mutual labels:  heroku, twitter-bot, tweets
rust-trending
A twitter bot (@RustTrending) to tweet trending rust repositories, inspired by @TrendingGithub
Stars: ✭ 113 (+334.62%)
Mutual labels:  twitter-bot, tweets
Twitter-bot
Twitter bot which waits for #hashTag and sends weather update of city via tweets
Stars: ✭ 20 (-23.08%)
Mutual labels:  twitter-bot, tweets
Heroku ebooks
A script to generate Markov chains and to post to an _ebooks account on Twitter using Heroku
Stars: ✭ 251 (+865.38%)
Mutual labels:  heroku, tweets
Twitter Activated Crypto Trading Bot
Buys crypto through keyword detection in new tweets. Executes buy in 1 second and holds for a given time (e.g. Elon tweets 'doge', buys Dogecoin and sells after 5 minutes). Tested on Kraken and Binance exchanges
Stars: ✭ 92 (+253.85%)
Mutual labels:  twitter-bot, tweets
coopboost
Grow your twitter audience.
Stars: ✭ 50 (+92.31%)
Mutual labels:  twitter-bot, tweets
awesome-twitter-bots
A Curated Collection of the Best Twitter Bots 🤖
Stars: ✭ 99 (+280.77%)
Mutual labels:  twitter-bot, tweets
tweet-delete
Self-destructing Tweets so you too can be cool 😎
Stars: ✭ 68 (+161.54%)
Mutual labels:  twitter-bot, tweets
TwitterAutoReplyBot
This is a tiny Python script that replies to a specified number of tweets containing a specified hashtag.
Stars: ✭ 33 (+26.92%)
Mutual labels:  twitter-bot, tweets
tradoge
DOGE trading bot for instantly buying and selling DOGE cryptocurrency on Binance when Elon Musk tweets about it.
Stars: ✭ 122 (+369.23%)
Mutual labels:  twitter-bot, tweets
TeleTweet
🦉 A telegram Twitter bot that will allow you send tweets!
Stars: ✭ 34 (+30.77%)
Mutual labels:  twitter-bot, tweets
tweet-delete-bot
A bot that deletes and un-favourites tweets that are more than 10 days old. Schedule this to run once a day to become an ephemeral tweep, just like http://twitter.com/JacksonBates
Stars: ✭ 39 (+50%)
Mutual labels:  twitter-bot, tweets
typescript-on-browser-starter
Starter for TypeScript on Web Browser
Stars: ✭ 23 (-11.54%)
Mutual labels:  quickstart
generator-vars-jekyll
Generator for raw web app with CircleCI, Jekyll, Webpack, Express + more.
Stars: ✭ 18 (-30.77%)
Mutual labels:  heroku
django-dialogflow
[Maintainer Required] Dialogflow Django is a web client to chat 💖
Stars: ✭ 26 (+0%)
Mutual labels:  heroku
GithubFa
🤖 A simple twitter bot for creating a Newsfeed from the Github repositories which is shared by Persian developer community
Stars: ✭ 40 (+53.85%)
Mutual labels:  twitter-bot
sakura-card-captor-api
protected-taiga-89091.herokuapp.com/
Stars: ✭ 32 (+23.08%)
Mutual labels:  heroku
buffalo-heroku
Archived use github.com/gobuffalo/buffalo-heroku
Stars: ✭ 16 (-38.46%)
Mutual labels:  heroku
order-management
Simple Order Management web application built using NodeJS, ExpressJS, Polymer, MongoDB
Stars: ✭ 33 (+26.92%)
Mutual labels:  heroku
heroku-deploy
A simple action to build, push and deploy your dockerized app to your Heroku Application
Stars: ✭ 40 (+53.85%)
Mutual labels:  heroku

This is a template for creating your own twitter bot using python and heroku. The only programming necessary is to update the function get_message() in app.py to create your bot's tweets.

Also, if you'd like to randomly favorite other users' tweets by keyword search, uncoment the call to random_favoriting() in main(), and change the keywords to those you'd like to search for.

Confused? Try reading this. Or contact me @jehosafet.

Requirements

  • python
    • Install Twython (pip install Twython): for generating/posting tweets in python app
  • heroku

Instructions

  1. Fork and pull this repo.

  2. In your local repo, create a new heroku app.

    • heroku create --stack cedar
    • heroku apps:rename YOUR_APP_NAME
    • Your heroku app will now keep the python script app.py running as often as possible.
  3. Create a new twitter account.

  4. From your main twitter account (not the one you just created, unless this is your first twitter account!) create a new twitter app.

    • Under Settings / Application Type:
      • Enable "Read and Write"
      • Check "Allow this application to be used to Sign in with Twitter"
    • Under Details:
      • Click "Create My Access Token"
    • Connect this app to your bot's twitter acount (help here)
      • $ gem install twurl
      • $ twurl authorize --consumer-key "REPLACE_THIS" --consumer-secret "REPLACE_THIS"
    • When twurl asks you to go to a url to log-in, now use the bot account you just created.
  5. Create an .env file containing your twitter keys.

    • twurl generated some keys for your new bot account. You can find these in ~/.twurlrc.
    • In your local repo, create a file called .env that contains these twitter app keys, one per line:
      • TWITTER_CONSUMER_KEY=replace_this
      • TWITTER_CONSUMER_SECRET=replace_this
      • TWITTER_OAUTH_TOKEN=replace_this
      • TWITTER_OAUTH_TOKEN_SECRET=replace_this
    • For heroku, use heroku-config to copy contents of .env to your heroku app.
      • Install heroku-config: heroku plugins:install heroku-config.
      • Now run heroku config:push.
        • NOTE: To update heroku environment variables later, run heroku config:push --overwrite
        • Alternatively, add heroku environment variables manually using heroku config:set YOUR_ENV_VAR=replace_this

Okay, now here's the fun part:

  1. Update the function get_message() in app.py to create your bot's tweets.

  2. Test your bot locally.

    • Running foreman start should generate your tweets once every minute, or at whatever rate you set in app.py.
  3. Commit and push local changes to heroku and github.

    • git push heroku master pushes all commits to heroku and starts up your app.
    • Your bot should now tweet as long as your heroku app is running (via the worker dyno).
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].