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

20181003_liff

 20181003_liff

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

knowledge_sakura

October 03, 2018
Tweet

More Decks by knowledge_sakura

Other Decks in Business

Transcript

  1. 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>
  2. 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 } );
  3. 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); });
  4. 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"}