Skip to content

A linebot that will post new media when your interested Instagram user has new post

License

Notifications You must be signed in to change notification settings

hsush2017/instagram-reminder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

instagram-reminder

Instagram reminder is a linebot, which sends new media while Instagram user you followed posts new media
img_1 img_2
Note that since it's impossible to access private IG users data(because you don't really follow that user), you can only follow public IG users in this bot.

HOW TO USE

First of all, scan the QR code to add bot
img_3

Commands

  • bot list
    List all IG users you followed.
  • bot follow [id]
    Add an IG user to your follow list. [id] is IG user name.
    Currently you can only follow 10 users.
  • bot unfollow [id]
    Remove an IG user from your follow list. [id] is IG user name.
  • bot help
    Show all commands
  • bot on
    Turn on bot notification
  • bot off
    Turn off bot notification
  • bot status
    Show current bot status

HOW TO RUN PROJECT

This project is build in following environment:

Java version: Java 8
Framwork: Spring Boot 1.5.8 + line-bot-api 1.10
Server platform: Heroku cloud application platform
Database: PostgreSQL 9.4.1212

If you want to run this project, follow these steps:

1. Import database

There are 2 tables which record user and IG users' latest media. Import them to your own database. table script

2. Create a channel for your bot:

Follow this tutorials to create bot.
You'll see bot's access token and channel secrete at setting page, these will be used at following steps.
img_4

To receive request from the Line platform, the webhook must be enabled.
Enabled webhook and set webhook url at setting page.   img_5

3. Create an instagram account & receive access token

Create an instagram account, and follow this tutorial step by setp to get access token.
Be sure that token has the public_content permission.

4. Modify application.yml

  • Paste linebot's access token and channel secret at application.yml.
  • Set handler.path depend on your server url

5. Modify application.properties

  • Paste database setting at application.properties, including driver, url, username, and password
  • Paste instagram access token as well

6. Deploy project to server

Since the webhook URL must use HTTPS, I deploy it on Heroku.
If you want to deploy server on other place, be sure to use HTTPS.

About

A linebot that will post new media when your interested Instagram user has new post

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages