Skip to content

Its using Raspberry Pi GPIO pins using the twitter API, tweet to turn on/off the lights and your tweet will get liked and retweeted too.

Notifications You must be signed in to change notification settings

Mysterious-Owl/twitter-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Its using Raspberry Pi GPIO pins using the twitter API, tweet to turn on/off the lights and your tweet will get liked and retweeted too.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages