Skip to content

skillsharer/twitter-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

Python Tweeting Script using Tweepy

This script allows you to send a tweet using the new X API (formerly known as Twitter) with Python and Tweepy. Detailed description can be found here.

Prerequisites

  1. Python 3.x installed.
  2. A .env file containing your X API keys.
  3. tweepy and python-dotenv

Setup & Installation

  1. Clone this repository:
git clone [email protected]:skillsharer/twitter-api.git
  1. Navigate to the directory:
cd twitter-api
  1. Install the required packages:
pip install tweepy python-dotenv
  1. Set up your .env file in the root of the directory with the following format:
CONSUMER_KEY=YOUR_CONSUMER_KEY
CONSUMER_SECRET=YOUR_CONSUMER_SECRET
ACCESS_TOKEN=YOUR_ACCESS_TOKEN
ACCESS_TOKEN_SECRET=YOUR_ACCESS_TOKEN_SECRET
BEARER_TOKEN=YOUR_BEARER_TOKEN

Usage:

Run the script using:

python tweet.py

The script will then send a "Hello, World!" tweet using the provided API keys.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages