gulzar1996 / auto-like-my-gf-insta-pic
- воскресенье, 24 декабря 2017 г. в 03:15:42
Bot to automatically like your friend's Instagram post and notify you on Slack
Bot to automatically like your friend's Instagram post and notify you on your Slack channel.
This script runs Instagram API every 15mins (cronjob) and checks for any new Instagram post for a paticular user_id
. If a new a post is found it likes the post and sends a notification to your configured Slack channel using Slack Webhooks.
git clone https://github.com/gulzar1996/auto-like-my-gf-insta-pic
npm install
.env
file (you must set accessToken
, user_id
(Target user id) from Instagram Developer API and slack_url
from Slack Webhooks ) as shown.
npm start
(run the app)Like all the recent instagram post (test)
GET http://localhost:3000/run
cd auto-like-my-gf-insta-pic
heroku login
heroku create
(add heroku to project)git push heroku master
(deploy to heroku)heroku ps:scale worker=1
(start dyno worker)Heroku will generate a url for you
http://<HEROKU_URL>.herokuapp.com/run
http://<HEROKU_URL>.herokuapp.com/run
in address15 mins
npm start
(run the app)node cron.js &
create a node-cron that sends GET to the app every 15 minps
to list background processeskill <process id>
to stop the node-cronInspired from https://github.com/cyandterry/Like-My-GF. Code written in JS from scratch.