Ever wanted to automate marketing with twitter? Well, now you can!
Using Tweety.py's Fast API Now you can do that and much more !
- comment on tweets with a specific hashtag/ keyword
- comment on tweets for free!
- comment on tweets that match a certain sentiment [Coming soon]
- comment on tweets that match a certain location [Coming soon]
- comment on tweets that match a certain language [Coming soon]
- Run campaigns on twitter that are scheduled! [Coming soon]
Want Better Documentation ?
Use FastAPI's Swagger UI
/signup : [POST]
body: {
"name":"",
"email": "",
"password": ""
}
/login : [POST]
body: {
"email": "",
"password": ""
}
returns : {
"access_token":"",
"refresh_token":""
}
/user : [GET] Get current user
/twitter: [GET] Connect twitter account to tweetypy account.
returns : Twitter URL to connect to
/twitter-callback-url: [GET] Twitter Callback url to finish Oauth `DANCE`.
/commentbot: [POST] Comment Bot to comment on posts
body: {
{
"tags": [
"string" // stores hashtags and keywords
],
"scripts": [
"string" // stores list of strings to
//be sent as comment randomly
],
"nums": 0 // count of comments to be sent in total.
}
}
-
clone the repo
-
cd into the folder
-
first create a virtualenv and activate it. example :
virtualenv venv
then activate it
./venv/bin/activate
-
Install requirements.
pip install -r requirements.txt
-
run server using:
uvicorn app:app --reload --port 8000
Your App will be running on LocalHost.
have a .env file in root that will contain these values:
CONSUMER_KEY
: twitter Consumer KeyCONSUMER_SECRET
: twitter Consumer SecretJWT_SECRET
: For jwt token generationMONGO_DB
: Mongo database nameMONGO_HOST
: Mongo host nameMONGO_PORT
: Mongo port numberMONGO_USER
: Mongo user nameMONGO_PASS
: Mongo passwordEMAIL_HOST
: Email hostEMAIL_HOST_USER
: Email of userEMAIL_HOST_PASSWORD
: Email password