戴均民
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Versions and GitHub Sync Note Insights Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       owned this note    owned this note      
    Published Linked with GitHub
    Subscribed
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    Subscribe
    --- title: Flex 開發人員工具:一個輔助開發 LINE chatbot 的開源工具 description: '這是講者為了輔助開發 LINE chatbot 而製作的小工具,它主打的功能是在收到 Messaging API 的 Event 時會直接回傳 JSON,如果傳送 Message JSON 或是 Flex Message Simulator 複製的 JSON 給它,你還能直接看到這個 JSON 的呈現結果!在這個議程內將會詳細介紹這個小工具的使用方法。原始碼以 MIT License 釋出: https://github.com/taichunmin/gcf-line-devbot' image: https://i.imgur.com/ALfHsUN.png tags: 簡報 type: slide langs: zh --- ## Flex 開發人員工具 #### 輔助開發 <span style="color: lime">LINE chatbot</span> 的開源工具 ###### [`hackmd.io/@taichunmin/COSCUP2022`](https://hackmd.io/@taichunmin/COSCUP2022) ###### <span style="color: gray">戴均民 @ COSCUP 2022</span> --- ## I am 戴均民 <table class="about-me"> <tr> <td><img src="https://www.gravatar.com/avatar/8d9b432d861e4ac0e40954a800ae90a1?s=2048" class="avatar"></td> <td> <ul> <li>現職 <span style="color: #e2231a">微程式資訊</span></li> <li>LINE API 專家</li> <li><a href="https://taichunmin.idv.tw/liff-businesscard/" target="_blank">LINE 數位版名片</a></li> <li><a href="https://lihi1.com/l5Dld/coscup-2020" target="_blank"><i class="fa fa-fw fa-rss-square"></i>筆記國度 (部落格)</a></li> <li><a href="https://github.com/taichunmin/" target="_blank"><i class="fa fa-fw fa-github"></i>taichunmin</a></li> </ul> </td> </tr> </table> <style> img.avatar { border-radius: 50%; width: 300px; } </style> --- #### Flex 開發人員工具 ![](https://i.imgur.com/lPN5cny.png) ###### [`line.me/R/ti/p/@736cebrk`](https://line.me/R/ti/p/@736cebrk) --- ## 這是受[卡米哥](https://medium.com/@EtrexKuo)啟發 ## 而寫出來的工具 --- # 功能介紹 --- #### #1 直接把收到的 Event 以 <span style="color: lime">JSON</span> 回傳 ![](https://i.imgur.com/5jpEzoW.png =x500) --- ## 一對一聊天 DEMO * follow * location * [`01-postback.json`](https://gist.github.com/taichunmin/e1da04f9f8fd8a2529c05f1a2581c17b#file-01-postback-json) * stickers * videoPlayComplete<br>[`02-countdown.json`](https://gist.github.com/taichunmin/e1da04f9f8fd8a2529c05f1a2581c17b#file-02-countdown-json) --- #### #1 你還可以在<span style="color: lime">群組</span>中使用這個工具 ###### 快速測試跨平台的相容性 (<span style="color: lime">Android</span> & <span style="color: lime">iPhone</span> & <span style="color: lime">PC</span>) ![](https://i.imgur.com/rONaJit.png) --- #### 快速開箱測試 <span style="color: lime">LINE 新發佈的功能</span> * [測試 mentions 標記好友功能](https://taichunmin.idv.tw/blog/2021-01-20-line-devbot-mention.html) * [Quick Reply 支援 URI Action](https://taichunmin.idv.tw/blog/2021-03-11-line-quickreply-uri.html) * [Flex 訊息第三版更新](https://taichunmin.idv.tw/blog/2022-03-11-line-flex-message-v3.html) --- ## 群組聊天 DEMO * join * member join/leave * mentions --- #### #2 回傳收到的 <span style="color: lime">Message Object</span> ![](https://i.imgur.com/sNDdMhD.png =x500) --- #### #2 <span style="color: lime">跨平台</span>查看呈現結果 [`03-text.json`](https://gist.github.com/taichunmin/e1da04f9f8fd8a2529c05f1a2581c17b#file-03-text-json) ###### 在電腦上送出後 馬上在手機上查看 ![](https://i.imgur.com/7mrf609.png) --- #### [`04-images.json`](https://gist.github.com/taichunmin/e1da04f9f8fd8a2529c05f1a2581c17b#file-04-images-json) ###### 不同平台的顯示上會有些微差異! ![](https://i.imgur.com/clQ1Mnn.png) --- #### [`05-datetimepicker.json`](https://gist.github.com/taichunmin/e1da04f9f8fd8a2529c05f1a2581c17b#file-05-datetimepicker-json) ![](https://i.imgur.com/OaCoHhk.png) --- ## [`06-quickreply.json`](https://gist.github.com/taichunmin/e1da04f9f8fd8a2529c05f1a2581c17b#file-06-quickreply-json) ![](https://i.imgur.com/ubzZmYN.png =x500) --- #### #3 回傳來自 [Flex 訊息模擬器](https://developers.line.biz/flex-simulator/)的 [`07-flex.json`](https://gist.github.com/taichunmin/e1da04f9f8fd8a2529c05f1a2581c17b#file-07-flex-json) ###### (如果 JSON 過長可以先 minify) ![](https://i.imgur.com/m2FkPlx.png) --- #### #3 <span style="color: lime">分享訊息</span>給好友或群組 DEMO ###### 快速測試 liff.shareTargetPicker() 能不能分享訊息 ![](https://i.imgur.com/UzD8ouR.png) --- #### #4 [圖文選單遊樂場](https://taichunmin.idv.tw/blog/2022-02-10-richmenu-playground.html) ###### 帶你超快速認識圖文選單的功能! ![](https://i.imgur.com/JTFx43R.png) --- #### [模仿自圖文選單遊樂場 (日文版)](https://developers.line.biz/en/news/2022/02/02/rich-menu-playground/) ###### 這是 LINE 官方提供的,可惜只提供日文。 ![](https://i.imgur.com/8FUbYJh.png) --- #### 圖文選單遊樂場 DEMO ![](https://i.imgur.com/q8CbxjT.png) --- #### #5 快速測試部份 Messaging API ###### [指令清單請點此](https://github.com/taichunmin/gcf-line-devbot/tree/master/line/handler/cmd) (某些指令還可以搭配 mentions) ![](https://i.imgur.com/ZgPSBCr.png) --- #### #6 [查詢並快速測試傳送貼圖](https://taichunmin.idv.tw/blog/2021-04-16-linebot-test-sticker.html) ###### `/replySticker 8525 16581292` `/notifySticker 8525 16581292` ![](https://i.imgur.com/q75lVw5.png) --- #### #7 選單<span style="color: lime">切換速度</span> DEMO ###### `linkRichMenuToUser` <span style="color: lime">V.S.</span> `richmenuswitch` ![](https://i.imgur.com/1HVSWb8.png) --- #### #8 測試 <span style="color: lime">LINE Simple Beacon</span>! ###### (感謝 `@dabo_huang` 提供照片) ![](https://i.imgur.com/cYbtq4I.jpg) --- #### #8 測試 <span style="color: lime">LINE Simple Beacon</span>! * 建立個人的 Messaging API 頻道 * [按照教學設定 Webhook](https://taichunmin.idv.tw/blog/2020-07-13-line-simple-beacon-workshop.html) * 發行個人的 LINE Simple Beacon HWID * 用 ESP32 燒錄 LINE Simple Beacon --- #### #8 [用 ESP32 自製八合一 LINE Beacon](https://taichunmin.idv.tw/blog/2021-03-06-line-octobeacon.html) ###### 進入工程模式透過 BLE 更換 HWID 等參數 ![](https://i.imgur.com/x5g2G2u.png) --- #### GitHub 原始碼 & QA 時間 ###### 喜歡的話麻煩<span style="color: lime">幫我按個 Star</span> ###### 沒有問題也可以<span style="color: lime">祝我生日快樂</span> 😝 ![](https://i.imgur.com/fsuj0GT.png) <style>code { font-size: 87.5%; color: #e83e8c; word-wrap: break-word; background-color: white; border-radius: .35rem; }</style>

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully