Skip to content

Latest commit

 

History

History
30 lines (23 loc) · 1.24 KB

README.md

File metadata and controls

30 lines (23 loc) · 1.24 KB

TWITTER BOT

This is a twitter bot, it will like and retweet your tweet, containing some keyword and will print the url of tweet. You can also use it to control GPIO pins of Raspberry Pi(as I did) and twitter controlled home lights.
Here I used the twython library to use Twitter API, this library can be used to all the things mentioned in twitter API document.

Code

To use with Raspberry Pi and control GPIO use rpicode.py and to use directly on desktop(no GPIO) use code.py

Prerequisites

To install twython pip install twython or check here
Generate your unique Twitter keys and token from here by creating a new app.

How to run the script

Update the keys and tokens in code.
Run the python file and enter the keyword you want to track, now any new tweet will automatically liked and retweeted. It will print the link of tweet

Video showing it controlling lights using Raspberry Pi

https://youtu.be/962BUCFqvDA

Screenshot showing the direct use of the script

Editor view Twitter view