iT邦幫忙

2017 iT 邦幫忙鐵人賽
DAY 18
0
Modern Web

從零開始認識 Node.js系列 第 18

[Day 18] 動手篇 - Line Bot 準備

Line Logo

前言

ithome 上傳圖片功能有不盡完善的地方,花了 10 分鐘理出無法上傳圖片的原因,原因如下

  • 副檔名:上傳不支援的副檔名 response 不會錯誤,但取不到 Link
  • 檔案大小的限制:檔案太大上傳進度會卡住,開工具看了才知道發生 413 ,不然試幾次都不知道問題
    http://ithelp.ithome.com.tw/upload/images/20161217/20102342vPVan2gr0C.png

前言結束,各位若發現上傳過程卡住或上傳完成加入沒 Link ,把檔案縮小和副檔案用 JPG 、 PNG 等試試

申請 Line Business 帳號

  1. Line Business 登入
    http://ithelp.ithome.com.tw/upload/images/20161217/20102342VimAraIStG.jpg

  2. 輸入 Line 的 Email 與密碼
    手機要準備好,登入時需要在 Line APP 上輸入驗證碼

    http://ithelp.ithome.com.tw/upload/images/20161217/20102342fHyKJyUlHU.png

  3. 新增公司,因為 Line Messaging API 需要綁在公司下
    http://ithelp.ithome.com.tw/upload/images/20161217/20102342pZQlnTzU9R.png

  4. 公司資料,我是選個人

申請公司 Line 帳號

  1. 帳號清單建立商用帳號
    http://ithelp.ithome.com.tw/upload/images/20161217/20102342VgFcPZuYT9.png

  2. Messaging API 選 開始使用Messaging API 或開始使用Developer Trial

    • 回應功能: 開始使用Messaging API
    • 回應 + 主動推訊息: 開始使用Developer Trial
      http://ithelp.ithome.com.tw/upload/images/20161217/20102342xrAVfkqhFL.png
  3. 建立 Line 帳號
    http://ithelp.ithome.com.tw/upload/images/20161217/20102342fe1tgKvWyO.png

  4. 確認後,記得按申請,才真得申請完成
    http://ithelp.ithome.com.tw/upload/images/20161217/20102342ErCeavGhdf.png

  5. 前進LINE@MESSAGER
    http://ithelp.ithome.com.tw/upload/images/20161217/20102342QLqvTmhNS5.png

  6. 開始使用 API
    http://ithelp.ithome.com.tw/upload/images/20161217/20102342kJCOtDVwKq.png

    若不小心關閉這一個畫面,可以從 Line Business 選擇剛才新增的帳號並點 LINE@MESSAGER ,進入後點擊左側選單的 帳號設定 裡的 Bot設定 既可回到這個頁面。

  7. Webhook傳訊 改為 允許
    http://ithelp.ithome.com.tw/upload/images/20161217/201023421oYVryh2hf.png

以上 Line Bot 的事前準備完成, Line 就可以先放一邊,明天還用不到 Line 。


上一篇
[Day 17] 動手篇 - 事前規劃
下一篇
[Day 19] 動手篇 - Koa is coming
系列文
從零開始認識 Node.js31
圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

尚未有邦友留言

立即登入留言