Built on the shoulder of giants, especially https://github.com/hidehiro98/
- LINE Messaging API
- Heroku
DO NOT INCLUDE 'line' in the name of provider and channel. If you do so, you cannnot create the provider nor the channel.
If you don't have brew, do this first
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Then do,
brew install heroku/brew/heroku
Alternative option: install by dowloading the Heroku Installer.
Download Git here and install it
sudo snap install --classic heroku
apt-get install git
Download the Heroku Installer and install it.
Download Git here and install it
Open a terminal (search for "Terminal" (Mac, Ubuntu) or "Command Prompt" (Windows) in your OS search bar).
We will dowload the bot code from Github, then we will push it to Heroku:
git clone https://github.com/yannklein/bob-the-bot.git [your-bot-name]
cd [your-bot-name]
heroku create [your-bot-name]
git push heroku master
We will configure the keys to access the LINE API service:
Replace [YOUR_LINE_CHANNEL_SECRET]
and [YOUR_LINE_ACCESS_TOKEN]
by your own keys.
heroku config:set LINE_CHANNEL_SECRET=[YOUR_LINE_CHANNEL_SECRET]
heroku config:set LINE_ACCESS_TOKEN=[YOUR_LINE_ACCESS_TOKEN]
Example (do not copy/paste in your terminal):
heroku config:set LINE_CHANNEL_SECRET=f73d5df3fagu3g301856e1dc4cfcf3e1
heroku config:set LINE_ACCESS_TOKEN=FbKBF7cB1HReh9lIc6M3bDz8Rd6D+0f1kvBaJF93QadC7SsGpHP9K1EOOYkbwRThXHdVSSupJ4TgKMEtE/LbnE2heif2GZci+ntGdP89cGfrbLiofFFBlrFygi58f/B5UsvqkvlfNM7BHddRZhhV2RgdB04t89/1O/w1cDnyilFU=
Optional: we will set the key for Watson image recognition:
heroku config:set IBM_IAM_API_KEY=[YOUR_IAM_API_KEY]
https://www.slideshare.net/HidehiroNagaoka/le-wagon-tokyo-line-bot-101