Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dogeared/happy-birthday-donald
https://github.com/dogeared/happy-birthday-donald
Last synced: about 18 hours ago
JSON representation
- Host: GitHub
- URL: https://github.com/dogeared/happy-birthday-donald
- Owner: dogeared
- Created: 2020-06-13T04:15:52.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-12-11T09:53:04.000Z (almost 2 years ago)
- Last Synced: 2024-04-15T13:19:42.107Z (7 months ago)
- Language: JavaScript
- Size: 79.1 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Happy Birthday Donald!
It's President* Trump's birthday on 6/14/2020.
Let's all wish him well by tweeting a Happy Birthday message every 5 minutes!
Each tweet will have a picture of President Barack Obama attached.
(1 of 100,000 pictures selected at random)## Setup
In order to use this app, you'll need [node.js](https://nodejs.org/en/download/) and a
[Twitter developer account](https://developer.twitter.com/en/docs/basics/getting-started).Create an [application](https://developer.twitter.com/en/apps) in your twitter developer account.
From the **Keys and tokens** tab of your app's details page, create an `Access token` and
`Access token secret` to go along with the auto-generated `Consumer API keys`.**NOTE**: You need to save the access token and the access token secret values as Twitter only
shows them once to you.run `npm install` to install the required node.js libraries.
## Running
Execute the following:
```
API_KEY= \
API_SECRET_KEY= \
ACCESS_TOKEN= \
ACCESS_TOKEN_SECRET= \
MESSAGE='Happy Birthday!' \
TO_HANDLE=@realdonaldtrump \
INTERVAL= \
TMP_PATH=/tmp/img.jpg \
node hbd.js
```**NOTE:** `TMP_PATH` is where downloaded image files are stored temporarily.
You should see output like this:
```
Kicking off Happy Birthday Donald.
About to send tweet. Next will be in 300000 milliseconds.Downloading image...
Uploading image to twitter...
Posting status to twitter...Downloading image...
Uploading image to twitter...
Posting status to twitter...
```