2. Agenda
• Line Bot API Capability and Limitation
• Setup Line Bot Trial on Heroku
• Advance usage:
• Send a picture, when user type some text.
• Create a “Hello” message when add your bot as
new friend.
• Project Demo: Line Bot
3. Line Bot Capability and
Limitation
• No Rich message (Link
message)
• No dashboard
• Cannot talk with multiple
People
• Cannot invite into chat room
4. Step 1: Request Line Bot Trial Account
Apply Line Bot trial account here
(Only 1 per Line Account)
5. Step 2: Deploy to Heroku by
one click
Link : https://github.com/kkdai/LineBotTemplate
6. Step 2: Deploy to Heroku by
one click
Remember this addreess
7. Step 3: Setup Fixed IP for
white list (not mandatory)
• NOT MANDATORY! (Let
empty also works)
• Two ways to setup Fixie in
Heroku
• Using Heroku Dashboard
• Using Heroku Toolbelt
8. Step 3: Setup Fixed IP for
white list (not mandatory)
• Through Heroku dashboard:
• Launch Heroju dashboard
• Go your deploy app page
• Go to “Resource"
• Go to "FIND MORE ADD-
ONS”
• Find “Fixie"
• Through Heroku Toolbelt
9. Step 3: Setup Fixed IP for
white list (not mandatory)
• Through Heroku Toolbelt
• $ heroku login
• $ heroku git:clone -a
<YOUR_HEROKU_APP_ID>
• $ cd linebotkkdaitest
• $ heroku addons:create
fixie:tricycle
10. Step 4. Fill your Heroku App
Callback address to Line Bot
• Copy your app address from
Heroku to Line Dashboard.
• It will be something like “
https://xxxxxx.herokuapp.com:
443/callback”
Fill your app dress here
11. Step 5. Get related Line Bot
info for Heroku App setting
• Need copy following variable:
• Channel ID
• Channel Secret
• MID
Need copy those three
12. Step 6. Fill your Line Bot
Information to Heroku Variables
• In Heroku [Dashboard] ->
[Settings]-> [Config Variables]
• Create following variables:
• ChannelID
• ChannelSecret
• MID
• Fill with you just got from Line
Bot Dashboard.
13. Send a Image to user
Parse bot request to received result
14. Send a Image to user
Make sure it is text message not operation
15. Send a Image to user
Send image to who text to the bot