This bot will work on google cloud functions ( treat google cloud functions as line webhook service )
Article : http://bit.ly/linebot_w_imgur
- Create imgur account & application, and get imgur app token
- Create album and upload some images, and get album id
- Create a Line Bot Account, and get Line Channnel Access Token
- Create a google cloud function, and set the triggered function name as
reply
- Copy The content of these two files ( index.js, package.json ) to the cloud functions you created. ( use online editor )
- replace
_KEYWORD1_
with the keyword you hope line bot to listen. ( eg. morning ) - replace
_IMGUR_ALBUM_ID_FOR_KEYWORD1_
with the album id in imgur ( eg. f5sXe ) - replace
_IMGUR_APP_TOKEN_
with your imgur application token - replace
_LINE_CHANNEL_ACCESS_TOKEN_
with line channel access token
- After saving the cloud function, you will get the deployed url.
- Copy the deployed url to your webhook url in Line Account
- Done. Enjoy it !
This project is licensed under the terms of the MIT license