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

ミニアプリとLIFFアプリ仕様・開発環境など

sumihiro3
September 17, 2020

 ミニアプリとLIFFアプリ仕様・開発環境など

LIFF Catchup for ミニアプリ [ミニアプリNight 第一弾]

https://linedevelopercommunity.connpass.com/event/187700/

sumihiro3

September 17, 2020
Tweet

More Decks by sumihiro3

Other Decks in Technology

Transcript

  1. • LIFF ΞϓϦͱ LINE Mini app ࢓༷ͷߟ࡯ • LIFF ΞϓϦ։ൃ؀ڥˍTips

    LIFF Catchup for ϛχΞϓϦ [ϛχΞϓϦNight ୈҰ஄] 2020.09.17 Sumihiro Kagawa
  2. Ճ઒ ੅ኍ (Sumihiro Kagawa) •LINE API Expert •python , TypeScript,

    Nuxt.js, AWS, GCP •Contributor of LINE Pay API SDK for python 2 sumihiro3 sumihiro.kagawa
  3. LIFF ΞϓϦͷ։ൃํ๏ • ϑϩϯτͰLIFF SDK ʢJavaScriptʣΛΠϯϙʔτ͠ɺఏڙ͞ΕΔAPI Λ࢖ͬ ͯϢʔβʔͷϓϩϑΟʔϧऔಘ΍ϝοηʔδૹ৴ͳͲ͕ߦ͑Δ // LIFF

    ॳظԽʙϢʔβʔͷϓϩϑΟʔϧΛऔಘ liff.init({liffId: "123456-abcedfg" // Use own liffId }) .then(() => { // Start to use liff's api liff.getProfile() .then(profile => { const name = profile.displayName }) .catch((err) => { console.log('error', err); }); }) .catch((err) => { console.log(err.code, err.message); }); 10
  4. LIFF ΞϓϦͰఏڙ͞ΕΔAPIʢൈਮʣ "1*໊ ఏڙػೳ MJ⒎JOJU -*''"1*ͷॳظԽॲཧ MJ⒎HFU04  MJ⒎JT*O$MJFOU ͳͲ

    -*''ΞϓϦಈ࡞؀ڥͷ৘ใʢ04 ݴޠ -*/&಺ϒϥ΢βͰಈ࡞͍ͤͯ͞Δ ͔Ͳ͏͔ͳͲʣΛऔಘ MJ⒎MPHJO ΢ΣϒΞϓϦ޲͚ͷ-*/&ϩάΠϯͷॲཧ MJ⒎HFU"DDFTT5PLFO ʮݱࡏͷϢʔβʔͷΞΫηετʔΫϯʯΛऔಘ MJ⒎TFOE.FTTBHFT Ϣʔβʔͷ୅ΘΓʹɺ-*''ΞϓϦ͕։͔Ε͍ͯΔτʔΫը໘ʹϝοηʔδΛ ૹ৴ MJ⒎TIBSF5BSHFU1JDLFS λʔήοτϐοΧʔʢάϧʔϓ·ͨ͸༑ͩͪΛબ୒͢Δը໘ʣΛදࣔ͠ɺλ ʔήοτϐοΧʔͰબ୒ͨ͠૬खʹɺ։ൃऀ͕࡞੒ͨ͠ϝοηʔδΛૹ৴ 11 https://developers.line.biz/ja/reference/liff/
  5. ܾࡁγεςϜͷར༻ • LIFF Ͱ΋LINE Pay API ΛࣗલͰಋೖͰ͖Δ • ࣮૷αϯϓϧ͋Γ·͢ 31

    https://github.com/sumihiro3/LineThingsDrinkBar υϦϯΫҰཡ ஫จ ܾࡁ࣮ߦ ܾࡁ׬ྃ υϦϯΫநग़ நग़׬ྃ நબ நબ׬ྃ
  6. 家族のお⼿伝い帳 Powered by チーム 家族愛 Ո଒ͷ͓ख఻͍ா • CLOVA + Bot

    + LIFF ࿈ܞ࡞඼ • LINE BOOT AWARDS 2018 ϑΝϛϦʔ෦໳৆ https://otetsudaicho.jimdofree.com/ 39
  7. 40

  8. システム構成 掃除をやったよ ü インテント処理 ü ポイント管理 ü クーポン発⾏ ü Bot

    へのPUSH ü ⽬標設定 Firebase 紙クーポン発⾏ DynamoDB API Gateway Lambda S3 LIFFアプリ 表⽰ Ո଒ͷ͓ख఻͍ா • AWS + Firebase - API Gateway + Lambda - HTML + LIFF + jQuery on S3 - DynamoDB - Firebase Realtime Database https://otetsudaicho.jimdofree.com/ 41
  9. LINE Things Drink Bar • LINE Things + LIFF ࿈ܞ࡞඼

    • LINE Things Mini Award 2019 ΤϯδχΞ෦໳৆ https://github.com/sumihiro3/LineThingsDrinkBar 42 42
  10. -*/&5IJOHT%SJOL#BS ΤΞʔϙϯϓ -*/&5IJOHT EFWFMPQNFOUCPBSE Ø υϦϯΫ஫จ Ø -*/& 1BZܾࡁ #-&

    ܦ༝Ͱ σόΠε࿈ܞ υϦϯΫநग़ Ϣʔβʔ -*/&#PU -*/& .FTTBHJOH"1* ΢ΣϒΞϓϦέʔγϣϯ αʔόʔ ܾࡁ༧໿ ˍ ࣮ߦ -*''ܦ༝Ͱͷ ֤छ"1* ࣮ߦ LINE Things Drink Bar • heroku - Flask + Jinja2 - PostgreSQL https://github.com/sumihiro3/LineThingsDrinkBar 44
  11. LPF REVUP 2020 LP • LPF REVUP 2020 ΠϕϯτLP •

    2020.11.14 ։࠵ https://revup.jp/ 45
  12. 46

  13. -1'3&761-1ʢIUUQTSFWVQKQʣ /FUMJGZ 'VODUJPOT ηογϣϯɺεϐʔΧʔ ͳͲͷΠϕϯτ৘ใฤू ؅ཧऀ NJDSP$.4 /FUMJGZ HJU QVDI

    Ϗϧυ /VYU+4 7VFKT -*/&'SPOUFOE 'SBNFXPSL ʢ-*''ʣ ։ൃऀ (JU)VC QVTI௨஌ ιʔείʔυऔಘ ߋ৽௨஌ ίϯςϯπऔಘ DPOOQBTT 4QFBLFS%FDL LPF REVUP 2020 LP • Netlify + microCMS ͷ JAMStack ߏ੒ - Netlify Hosting, Functions - Nuxt.js (Full Static Generation) - microCMS ΍GitHub ͷߋ৽ΛτϦΨʔ ʹαΠτΛϏϧυ 47 https://revup.jp/
  14. LIFF URL ͷύεɾύϥϝʔλ࿈݁࢓༷Λ ೺Ѳ͓ͯ͘͠ • LIFF ͷΤϯυϙΠϯτURL ʹύε΍ύϥϝʔλΛࢦఆͨ͠৔߹ɺLIFF ॳظԽ ޙʹભҠ͢ΔURL

    ͕΍΍͍͜͠ʢ΍΍͔ͬͨ͜͠ʣ ✦ ΤϯυϙΠϯτΛ https://example.com/2020campaign/?key=value ͷΑ͏ʹࢦఆ ͍ͯͨ͠৔߹ʹɺLIFF URL ʹύϥϝʔλΛ෇༩ͯ͠LIFF ΞϓϦΛ։͘ͱɺΤϯυϙ Πϯτʹࢦఆͨ͠ύεɾύϥϝʔλʢ্ه੺ࣈ෦෼ʣ͕ফ͑ͯ͠·͏ • ௥Ճ͞Εͨʮ࿈݁ʯઃఆΛ࢖͏ͱղফ͠·͢ https://developers.line.biz/ja/docs/liff/opening-liff-app/#redirect-flow 52
  15. 53