/SMSwithoutBorders-customplatform-Twitter

SMSWithoutBorders Twitter Template: This allows publisher to send out Twitter messages on user's behalf using the Twitter API

Primary LanguagePythonGNU General Public License v3.0GPL-3.0

SMSwithoutBorders-customplatform-Python

Requirements

Installation

Create a Virtual Environments (venv)

python3 -m venv venv

Move into Virtual Environments workspace

. venv/bin/activate

Install all python packages

python -m pip install -r requirements.txt

How to use

Run script

python3 src/twitter.py

Test

Test scripts are found in the dir test/.

The test attempts to acquire your token and stores in the path:

test/token.json

To run the test, you will need your credentials.json which should look like

{
  "client_id": "",
  "client_secret": "",
  "redirect_uri": "https://localhost:9000/callback"
}

Place the credentials file in the test/ directory (make sure the file is called credentials.json).

Be sure to have the redirect_uri added to list of redirect origins in your twitter developers portal.

To run the test and acquire the token file only.

python3 test/get_token.py