There is an article explaining the usage of the original version of this code here: https://read.acloud.guru/build-a-serverless-twitter-bot-that-interacts-using-sentiment-analysis-fbb6e528628.
You can test out what happens with the original code by sending a positive tweet to @jbesw - you will receive an automatic like within 5 minutes from that bot.
Clone and npm install
in your downloaded directory.
Don't forget to:
- Update your Twitter credentials
- Update the query parameters
- Inspect the schedule in serverless.yaml
- See exampleResponse.json for an example of what a typical Twitter API response looks like.
- Check the Twitter Automation Rules to make sure you're compliant. In particular, you can no longer "like" in an automated manner!
If you have any questions or comments about the original code, feel free to contact James Beswick at @jbesw.
The configuration files for this code indicate that it is licensed under the ISC license, which is as follows (I have inserted the original code author's name and year of first code commit).
Copyright 2019 James Beswick
Permission to use, copy, modify, and/or distribute this software for any purpose
with or without fee is hereby granted, provided that the above copyright notice
and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
THIS SOFTWARE.