A Flask-based web application that allows users to schedule tweets. The app utilizes the Tweepy library for tweeting and the gspread library for storing tweet data in a spreadsheet. It provides a user-friendly interface for creating and managing tweet schedules.
- Schedule Tweets: Create and schedule tweets to be posted at specific dates and times.
- Tweet Management: View and delete scheduled tweets.
- Automatic Tweet Posting: A worker script (
tweet.py
) continuously runs in the background, checking the scheduled tweets, and automatically posts them at the specified times. - Spreadsheet Integration: The app updates a spreadsheet using the gspread library, for the storage and tracking of tweet data.
To use the Tweet Scheduler Web App, follow these steps:
- Clone this repository to your local machine using the following command:
git clone https://github.com/2spi/tweet-scheduler.git
- Install the required dependencies by running the following command:
pip install -r requirements.txt
- Set up your Twitter API credentials by creating a .env file and adding the necessary details:
TWITTER_API_KEY=your_api_key TWITTER_API_SECRET=your_api_secret TWITTER_ACCESS_TOKEN=your_access_token TWITTER_ACCESS_TOKEN_SECRET=your_access_token_secret
- Set up your Google Sheets API credentials. Store as
gsheet-credentials.json
. - Run the Flask app:
export FLASK_APP=main/app.py flask run
- Start the worker script (
tweet.py
):python tweet.py