This adapter provides a pluggable implementation for integrating Twitter as a messaging platform. It is designed to work with RelaySMS Publisher, enabling users to connect to Twitter using OAuth2 authentication.
- Python: Version >= 3.8.10
- Python Virtual Environments: Documentation
Install the necessary system packages:
sudo apt install build-essential python3-dev-
Create a virtual environment:
python3 -m venv venv
-
Activate the virtual environment:
. venv/bin/activate -
Install the required Python packages:
pip install -r requirements.txt
- Obtain your credentials from the Twitter Developer Portal.
- Set the
credentials.jsonpath of your credentials file in themanifest.ini:
[credentials]
path = ./credentials.jsonSample credentials.json
{
"client_id": "",
"client_secret": "",
"redirect_uris": ["http://localhost/callback/"]
}Only the first item in the
redirect_urisis used for the OAuth2 flow.