This is a simple script used to display the latest Tweet from a given account in Gather Town. The script generates an image for the tweet and displays it on a given map.
This script assumes that you are able to serve the generated images on a web server you own.
Clone or download the repo.
Install python dependencies
pip install -r requirements.txt
Make a copy of the config.ini.example
file to create config.ini
cp config.ini.example config.ini
Fill in all the fields:
DOMAIN
specifies the domain at which the images will be servedTOKEN
is your Twitter app only Bearer TokenUSERID
is the ID of the target Twitter userAPI_KEY
is your Gather API keySPACE_ID
is your Gather Space IDOBJECT_NAME
is the name of the object which will be updated on the mapMAP_ID
is the id of the Gather map
In Gather, create a new object with a name set to the OBJECT_NAME
value you
have (e.g. tweetd
).
Now setup a web server to host the generated images under DOMAIN
. Make sure
you set an Access-Control-Allow-Origin
header to either a wildcard *
or to
https://gather.town
. The generated images will be in a folder called static
.
Finally, run app.py
either in a screen
or as a service.