This is an OpenFaaS function written in Python that makes use of the tweepy
library to send a tweet from your Twitter account.
- You will need to specify your Twitter app environment variables in the
send-tweet.yml
file.
consumer_key: ""
consumer_secret: ""
access_token: ""
access_token_secret: ""
If you do not have a Twitter App you can create one here.
- In the same file, you must set the gateway IP which should be your Raspberry Pi IP address.
gateway: http://<RASPBERRY_IP_ADDR>:8080
faas-cli build -f ./send-tweet.yml
Note: before pushing to the Docker Hub, please go to the send-tweet.yml
file and in the image
property change the value from send-tweet
to include your Docker Hub account - i.e. felipecruz/send-tweet
faas-cli push -f ./send-tweet.yml
faas-cli deploy -f ./send-tweet.yml