Twitter Bot
This project allows you to post random technology-related quotes on Twitter using a Twitter bot. To get started with this project, follow the installation steps below.
Before using the project, ensure you have Python installed on your system. You can download Python from python.org.
-
Clone the GitHub repository containing the TwitterBot.py project to your local machine using the following command:
git clone https://github.com/milosnowcat/twitterbot.py.git
-
Navigate to the
twitterbot.py
directory:cd twitterbot.py
-
Install the required Python packages using pip:
pip install -r requirements.txt
-
Create a
.env
file in the project directory and add your Twitter API credentials as follows:Api_Key=YOUR_API_KEY Api_Secret=YOUR_API_SECRET Access_Token=YOUR_ACCESS_TOKEN Access_Token_Secret=YOUR_ACCESS_TOKEN_SECRET
Replace
YOUR_API_KEY
,YOUR_API_SECRET
,YOUR_ACCESS_TOKEN
, andYOUR_ACCESS_TOKEN_SECRET
with your actual Twitter API credentials. -
Run the
main.py
script to start the Twitter bot:python main.py
-
The script will retrieve a random technology-related quote using the Quotable API and post it as a tweet on your Twitter account.
-
To stop the script, press
Ctrl + C
in your terminal.
That's it! You have successfully installed and used the TwitterBot.py project to post random technology-related quotes on Twitter using your Twitter bot.
The TwitterBot.py project allows you to post random technology-related quotes on Twitter using a Twitter bot. Follow these steps to use the project.
-
Ensure you have followed the installation steps mentioned in the "Installation of the TwitterBot.py Project" section.
-
Create a
.env
file in the project directory and add your Twitter API credentials as shown in the installation steps.
-
Run the
main.py
script to start the Twitter bot:python main.py
-
The script will retrieve a random technology-related quote from the Quotable API and post it as a tweet on your Twitter account.
-
The tweet will include the quote and its author in the format: "quote ~ author."
-
To stop the script, press
Ctrl + C
in your terminal.
That's it! You have successfully used the TwitterBot.py project to post random technology-related quotes on Twitter using your Twitter bot and API credentials.