Upgrade to Pro — share decks privately, control downloads, hide ads and more …

20181003_liff

 20181003_liff

【福岡】Bot開発技術を極めたいエンジニア大集合! 福岡市粗大ごみ受付Botを大解剖 資料
https://line.connpass.com/event/100319/

9f203fdf00986da712b471b2e6f95c5f?s=128

knowledge_sakura

October 03, 2018
Tweet

Transcript

  1. -*/&Ͱ8FC"QQ ͱ͍͏Մೳੑ l-*''z

  2. "CPVUNF w %BJTVLF4IJNJ[V w -*/&6*5 w 6*5.FFUVQ w IUUQTFOHJOFFSJOHMJOFDPSQDPNKBCMPHEFUBJM 

  3. -*/&'SPOUFOE 'SBNFXPSL

  4. 8IBU`T-*'' w 8FC7JFXJOUFHSBUFEXJUI-*/& w 8FC7JFX+BWB4DSJQU4%, w "VUI0QFO*%$POOFDU w VVNFTTBHJOH"1*XJUI$034

  5. w 8,8FC7JFX J04 $ISPNJVN "OESPJE w /BUJWF3&45"1* w 7JFX5ZQF w

    4VQQPSUUBSHFUl@CMBOLz-*/&W /FX 8FC7JFX4%, w +BWB4DSJQU4%, <script src="https://d.line-scdn.net/liff/1.0/sdk.js"></script>
  6. 0QFO*E$POOFDU w $PNQBUJCJMJUZXJUI0QFO*E$POOFDU w &BTZUPHFUVTFS*EWJB+BWB4DSJQU4%, liff.init( data => { //

    Now you can call LIFF API const userId = data.context.userId; }, err => { // LIFF initialization failed } );
  7. VVNFTTBHJOHBQJ w /PUCPUUPVTFS QSPWJEFVTFSUPVTFSNFTTBHJOHBQJ w "TTJTUJOHDPOWFSTBUJPOXJUIDIBUCPUBOEVTFST w 4VQQPSU$SPTT0SJHJO3FTPVSDF4IBSJOH $034 

    liff.sendMessages([ { type:'text', text:'Hello, World!' } ]) .then(() => { console.log('message sent'); }) .catch((err) => { console.log('error', err); });
  8. UFOPS

  9. $SFBUF-*''"QQ $SFBUF.FTTBHJOH"1*$IBOOFM (FU$IBOOFM"DDFTT5PLFO

  10. curl -X POST \ -H "Authorization: Bearer {channel access token}"

    \ -H "Content-Type: application/json" \ -d '{ "view":{ "type": "compact", "url": “{URL}” } }' https://api.line.me/liff/v1/apps {“liffId":"line://app/1610390197-WapaEX5p"}
  11. MJOFBQQ8BQB&9Q

  12. 5JQT w $SFBUF-*''"QQVQUPQFSDIBOOFM w .VTUUPVTFIUUQTQSPUPDPM w 6TFRVFSZTUSJOHJOTUFBEPGQBUI w ˁMJOFBQQ\MJ⒎*E^GPP w

    ˁMJOFBQQ\MJ⒎*E^ JEGPP w /FFEUPDPOTJEFSBCPVUMBOETDBQFNPEF
  13. $PODMVTJPO w ؆୯ʹ-*/&্Ͱ8FC"QQMJDBUJPOΛ࡞੒͢Δ͜ͱ͕Ͱ͖Δ w 4FSWFSMFTTͰ։ൃͰ͖ΔͷͰ௿ίετͰ࢝ΊΒΕΔ w 'MFY.FTTBHFͳͲଞͷ"1*ͱ૊Έ߹ΘͤΔ͜ͱͰ-*/&ͷ DIBU಺ͰఏڙͰ͖Δػೳͷ෯͕޿͕Δ w ࠓޙ΋༷ʑͳ"1*͕ఏڙ͞Ε·͢

  14. IUUQTEFWFMPQFSTMJOFNFKBEPDTMJ⒎ IUUQTHJUIVCDPNMJOFMJOFMJ⒎TUBSUFS IUUQTHJUIVCDPNMJOFMJOFQMBUGPSNGFFECBDL

  15. 5IBOLZPV