SlideShare ist ein Scribd-Unternehmen logo
1 von 19
Downloaden Sie, um offline zu lesen
Engineering
Introduction to LIFF
(LINE Front-End Framework)
Warit Wanwithu
Technical Consultant
Engineering
• What is LIFF?
• LIFF Benefits
• LIFF Use cases
• Demo
Agenda
WHAT IS LIFF
LINE Frontend-End Framework
LIFF
WebView that allows seamless integration between
CHAT and WEB
COMPACT TALL FULL
MULTI VIEW SIZES
LIFF BENEFITS
CHAT BOT EXTENSION END USERS
LIFF BENEFITS
ENHANCE USEFUL REACHABLE
ENHANCE CHATBOT
CHAT BOT EXTENSION END USERS
LIFF BENEFITS
ENHANCE USEFUL REACHABLE
WEB
GAME
GAME IOT
LINE Front-End Framework
UTILITY OTHER
USEFUL EXTENSION
CHAT BOT EXTENSION END USERS
LIFF BENEFITS
ENHANCE USEFUL REACHABLE
Step to get started
1.Import LIFF SDK
2.Prepare Canvas
3.Call LIFF API
4.Handle save image
5.Register LIFF App
1. Import LIFF SDK
• LIFF SDK provide interface for LIFF Feature
//Load LIFF SDK
<script src="https://d.line-scdn.net/liff/1.0/sdk.js><script>
2. Prepare Canvas
<script src="https://cdn.jsdelivr.net/npm/signature_pad@2.3.2/dist/
signature_pad.min.js"></script>
<script>
const canvas = document.querySelector('#canvas');
const signaturePad = new SignaturePad(canvas, {
backgroundColor: 'rgb(238,238,238)',
});
$(window).on('load', function(){
canvas.setAttribute('width', $('.container').width());
canvas.setAttribute('height', window.innerHeight - $('#btn').outerHeight() - 10);
signaturePad.clear();
liff.init(function (data) {});
});
</script>
3. Call LIFF API
liff.getProfile().then(function (profile) {
liff.sendMessages([
{
type: 'image',
originalContentUrl: 'https://' + document.domain + '/imgs/' + res + '.jpg',
previewImageUrl: 'https://' + document.domain + '/imgs/' + res + '_240.jpg'
},
{
type: 'text',
text: 'From:' + profile.displayName
}
]).then(function () {
liff.closeWindow();
}})
4. Handle Save Image
if not os.path.exists(dir_name):
os.makedirs(dir_name)
with open(os.path.join(dir_name, '{}.jpg'.format(img_name)), 'wb') as img:
img.write(base64.b64decode(event['image'].split(",")[1]))
original = Image.open(os.path.join(dir_name, '{}.jpg'.format(img_name)))
original.thumbnail((240, 240), Image.ANTIALIAS)
original.save(os.path.join(dir_name, '{}_240.jpg'.format(img_name)), 'JPEG')
return make_response(img_name, 200)
5. Registration LIFF App
# Request
curl -XPOST 
-H "Authorization: Bearer {CHANNEL_ACCESS_TOKEN}" 
-H "Content-Type: application/json" 
-d '{
    "view": {
        "type": "full",
        "url": "https://example.com/myservice"
    }
}' 
https://api.line.me/liff/v1/apps
# Response
{“liffId”:”0123456789-nXjrqEEr”}
# LINE Scheme
line://app/0123456789-nXjrqEEr
LINE API PLAYGROUND
Engineering
THANK YOU :)

Weitere ähnliche Inhalte

Was ist angesagt?

E Learning Presentation
E Learning PresentationE Learning Presentation
E Learning Presentation
LBG
 
ICT Tools and the Utilisation
ICT Tools and the UtilisationICT Tools and the Utilisation
ICT Tools and the Utilisation
kinarossi
 

Was ist angesagt? (20)

Forum vs Blog
Forum vs BlogForum vs Blog
Forum vs Blog
 
E Learning Presentation
E Learning PresentationE Learning Presentation
E Learning Presentation
 
RUP
RUPRUP
RUP
 
Introduction to Online Teaching-Learning
Introduction to Online Teaching-LearningIntroduction to Online Teaching-Learning
Introduction to Online Teaching-Learning
 
Software Architecture and Design
Software Architecture and DesignSoftware Architecture and Design
Software Architecture and Design
 
SQL express course for begginers
   SQL express course for begginers   SQL express course for begginers
SQL express course for begginers
 
Ch09-User Interface Design
Ch09-User Interface DesignCh09-User Interface Design
Ch09-User Interface Design
 
Papel do Professor online:Ensinar na Rede
Papel do Professor online:Ensinar na RedePapel do Professor online:Ensinar na Rede
Papel do Professor online:Ensinar na Rede
 
Human Computer Interaction Chapter 2
Human Computer Interaction Chapter 2Human Computer Interaction Chapter 2
Human Computer Interaction Chapter 2
 
Constructing Enterprise Applications
Constructing Enterprise  ApplicationsConstructing Enterprise  Applications
Constructing Enterprise Applications
 
ICT Tools and the Utilisation
ICT Tools and the UtilisationICT Tools and the Utilisation
ICT Tools and the Utilisation
 
E learning concepts and techniques
E learning concepts and techniquesE learning concepts and techniques
E learning concepts and techniques
 
learning Management system
learning Management systemlearning Management system
learning Management system
 
Requirement engineering process
Requirement engineering processRequirement engineering process
Requirement engineering process
 
Requirement Engineering Lec.1 & 2 & 3
Requirement Engineering Lec.1 & 2 & 3Requirement Engineering Lec.1 & 2 & 3
Requirement Engineering Lec.1 & 2 & 3
 
New Trends in Educational Technology
New Trends in Educational TechnologyNew Trends in Educational Technology
New Trends in Educational Technology
 
Blended learning
Blended learningBlended learning
Blended learning
 
Website Evaluation Tutorial
Website Evaluation TutorialWebsite Evaluation Tutorial
Website Evaluation Tutorial
 
E learning ppt
E learning pptE learning ppt
E learning ppt
 
Technology Enhanced Active Learning
Technology Enhanced Active LearningTechnology Enhanced Active Learning
Technology Enhanced Active Learning
 

Ähnlich wie Introduction to LIFF (LINE Front-End Framework)

Netbeans65 Osum Slides
Netbeans65 Osum SlidesNetbeans65 Osum Slides
Netbeans65 Osum Slides
Abhishek Gupta
 
RAP vs GWT Which AJAX Technology is for you?
RAP vs GWT Which AJAX Technology is for you?RAP vs GWT Which AJAX Technology is for you?
RAP vs GWT Which AJAX Technology is for you?
Mark Russell
 
Your last mile to SOA and Web 2.0- Lotus Expeditor for Devices - Eric MF Hsu,...
Your last mile to SOA and Web 2.0- Lotus Expeditor for Devices - Eric MF Hsu,...Your last mile to SOA and Web 2.0- Lotus Expeditor for Devices - Eric MF Hsu,...
Your last mile to SOA and Web 2.0- Lotus Expeditor for Devices - Eric MF Hsu,...
mfrancis
 

Ähnlich wie Introduction to LIFF (LINE Front-End Framework) (20)

Workshop: Arduino for makers - Strumenti SW per la prototipazione elettronica...
Workshop: Arduino for makers - Strumenti SW per la prototipazione elettronica...Workshop: Arduino for makers - Strumenti SW per la prototipazione elettronica...
Workshop: Arduino for makers - Strumenti SW per la prototipazione elettronica...
 
10 Key Criteria for Mobile Platform Selection
10 Key Criteria for Mobile Platform Selection10 Key Criteria for Mobile Platform Selection
10 Key Criteria for Mobile Platform Selection
 
WebRTC in WebKitGTK+ and WPE (Web Engines Hackfest 2018)
WebRTC in WebKitGTK+ and WPE (Web Engines Hackfest 2018)WebRTC in WebKitGTK+ and WPE (Web Engines Hackfest 2018)
WebRTC in WebKitGTK+ and WPE (Web Engines Hackfest 2018)
 
VAST 8.0
VAST 8.0VAST 8.0
VAST 8.0
 
Infinite Toolkit: an overview
Infinite Toolkit: an overviewInfinite Toolkit: an overview
Infinite Toolkit: an overview
 
Android Services Skill Sprint
Android Services Skill SprintAndroid Services Skill Sprint
Android Services Skill Sprint
 
[Rakuten TechConf2014] [E-4] Rakuten Front-end Framework Project
[Rakuten TechConf2014] [E-4] Rakuten Front-end Framework Project[Rakuten TechConf2014] [E-4] Rakuten Front-end Framework Project
[Rakuten TechConf2014] [E-4] Rakuten Front-end Framework Project
 
BP218 IBM Lotus Notes 8 and IBM Lotus Expeditor Customization for LotusScript...
BP218 IBM Lotus Notes 8 and IBM Lotus Expeditor Customization for LotusScript...BP218 IBM Lotus Notes 8 and IBM Lotus Expeditor Customization for LotusScript...
BP218 IBM Lotus Notes 8 and IBM Lotus Expeditor Customization for LotusScript...
 
VASmalltalk, Today and Tomorrow
VASmalltalk, Today and TomorrowVASmalltalk, Today and Tomorrow
VASmalltalk, Today and Tomorrow
 
2.1.design center
2.1.design center2.1.design center
2.1.design center
 
Netbeans65 Osum Slides
Netbeans65 Osum SlidesNetbeans65 Osum Slides
Netbeans65 Osum Slides
 
JavaFx
JavaFxJavaFx
JavaFx
 
Leaflet-IIIF: Plugins and Extensibility with IIIF
Leaflet-IIIF: Plugins and Extensibility with IIIFLeaflet-IIIF: Plugins and Extensibility with IIIF
Leaflet-IIIF: Plugins and Extensibility with IIIF
 
Flutter vs react native – from developer point
Flutter vs react native – from developer pointFlutter vs react native – from developer point
Flutter vs react native – from developer point
 
The new WPE API
The new WPE APIThe new WPE API
The new WPE API
 
Philipe Riand - Building Social Applications using the Social Business Toolki...
Philipe Riand - Building Social Applications using the Social Business Toolki...Philipe Riand - Building Social Applications using the Social Business Toolki...
Philipe Riand - Building Social Applications using the Social Business Toolki...
 
RAP vs GWT Which AJAX Technology is for you?
RAP vs GWT Which AJAX Technology is for you?RAP vs GWT Which AJAX Technology is for you?
RAP vs GWT Which AJAX Technology is for you?
 
Your last mile to SOA and Web 2.0- Lotus Expeditor for Devices - Eric MF Hsu,...
Your last mile to SOA and Web 2.0- Lotus Expeditor for Devices - Eric MF Hsu,...Your last mile to SOA and Web 2.0- Lotus Expeditor for Devices - Eric MF Hsu,...
Your last mile to SOA and Web 2.0- Lotus Expeditor for Devices - Eric MF Hsu,...
 
Looking Toward the World Connected and Expanded through Things LINE's Effort ...
Looking Toward the World Connected and Expanded through Things LINE's Effort ...Looking Toward the World Connected and Expanded through Things LINE's Effort ...
Looking Toward the World Connected and Expanded through Things LINE's Effort ...
 
Impact of Adobe Edge Tools and Services in Higher Education
Impact of Adobe Edge Tools and Services in Higher EducationImpact of Adobe Edge Tools and Services in Higher Education
Impact of Adobe Edge Tools and Services in Higher Education
 

Mehr von LINE Corporation

Mehr von LINE Corporation (20)

JJUG CCC 2018 Fall 懇親会LT
JJUG CCC 2018 Fall 懇親会LTJJUG CCC 2018 Fall 懇親会LT
JJUG CCC 2018 Fall 懇親会LT
 
Reduce dependency on Rx with Kotlin Coroutines
Reduce dependency on Rx with Kotlin CoroutinesReduce dependency on Rx with Kotlin Coroutines
Reduce dependency on Rx with Kotlin Coroutines
 
Kotlin/NativeでAndroidのNativeメソッドを実装してみた
Kotlin/NativeでAndroidのNativeメソッドを実装してみたKotlin/NativeでAndroidのNativeメソッドを実装してみた
Kotlin/NativeでAndroidのNativeメソッドを実装してみた
 
Use Kotlin scripts and Clova SDK to build your Clova extension
Use Kotlin scripts and Clova SDK to build your Clova extensionUse Kotlin scripts and Clova SDK to build your Clova extension
Use Kotlin scripts and Clova SDK to build your Clova extension
 
The Magic of LINE 購物 Testing
The Magic of LINE 購物 TestingThe Magic of LINE 購物 Testing
The Magic of LINE 購物 Testing
 
GA Test Automation
GA Test AutomationGA Test Automation
GA Test Automation
 
UI Automation Test with JUnit5
UI Automation Test with JUnit5UI Automation Test with JUnit5
UI Automation Test with JUnit5
 
Feature Detection for UI Testing
Feature Detection for UI TestingFeature Detection for UI Testing
Feature Detection for UI Testing
 
LINE 新星計劃介紹與新創團隊分享
LINE 新星計劃介紹與新創團隊分享LINE 新星計劃介紹與新創團隊分享
LINE 新星計劃介紹與新創團隊分享
 
​LINE 技術合作夥伴與應用分享
​LINE 技術合作夥伴與應用分享​LINE 技術合作夥伴與應用分享
​LINE 技術合作夥伴與應用分享
 
LINE 開發者社群經營與技術推廣
LINE 開發者社群經營與技術推廣LINE 開發者社群經營與技術推廣
LINE 開發者社群經營與技術推廣
 
日本開發者大會短講分享
日本開發者大會短講分享日本開發者大會短講分享
日本開發者大會短講分享
 
LINE Chatbot - 活動報名報到設計分享
LINE Chatbot - 活動報名報到設計分享LINE Chatbot - 活動報名報到設計分享
LINE Chatbot - 活動報名報到設計分享
 
在 LINE 私有雲中使用 Managed Kubernetes
在 LINE 私有雲中使用 Managed Kubernetes在 LINE 私有雲中使用 Managed Kubernetes
在 LINE 私有雲中使用 Managed Kubernetes
 
LINE TODAY高效率的敏捷測試開發技巧
LINE TODAY高效率的敏捷測試開發技巧LINE TODAY高效率的敏捷測試開發技巧
LINE TODAY高效率的敏捷測試開發技巧
 
LINE 區塊鏈平台及代幣經濟 - LINK Chain及LINK介紹
LINE 區塊鏈平台及代幣經濟 - LINK Chain及LINK介紹LINE 區塊鏈平台及代幣經濟 - LINK Chain及LINK介紹
LINE 區塊鏈平台及代幣經濟 - LINK Chain及LINK介紹
 
LINE Things - LINE IoT平台新技術分享
LINE Things - LINE IoT平台新技術分享LINE Things - LINE IoT平台新技術分享
LINE Things - LINE IoT平台新技術分享
 
LINE Pay - 一卡通支付新體驗
LINE Pay - 一卡通支付新體驗LINE Pay - 一卡通支付新體驗
LINE Pay - 一卡通支付新體驗
 
LINE Platform API Update - 打造一個更好的Chatbot服務
LINE Platform API Update - 打造一個更好的Chatbot服務LINE Platform API Update - 打造一個更好的Chatbot服務
LINE Platform API Update - 打造一個更好的Chatbot服務
 
Keynote - ​LINE 的技術策略佈局與跨國產品開發
Keynote - ​LINE 的技術策略佈局與跨國產品開發Keynote - ​LINE 的技術策略佈局與跨國產品開發
Keynote - ​LINE 的技術策略佈局與跨國產品開發
 

Kürzlich hochgeladen

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 

Kürzlich hochgeladen (20)

presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 

Introduction to LIFF (LINE Front-End Framework)

  • 1. Engineering Introduction to LIFF (LINE Front-End Framework) Warit Wanwithu Technical Consultant
  • 2. Engineering • What is LIFF? • LIFF Benefits • LIFF Use cases • Demo Agenda
  • 4. LINE Frontend-End Framework LIFF WebView that allows seamless integration between CHAT and WEB
  • 7. CHAT BOT EXTENSION END USERS LIFF BENEFITS ENHANCE USEFUL REACHABLE
  • 9. CHAT BOT EXTENSION END USERS LIFF BENEFITS ENHANCE USEFUL REACHABLE
  • 10. WEB GAME GAME IOT LINE Front-End Framework UTILITY OTHER USEFUL EXTENSION
  • 11. CHAT BOT EXTENSION END USERS LIFF BENEFITS ENHANCE USEFUL REACHABLE
  • 12. Step to get started 1.Import LIFF SDK 2.Prepare Canvas 3.Call LIFF API 4.Handle save image 5.Register LIFF App
  • 13. 1. Import LIFF SDK • LIFF SDK provide interface for LIFF Feature //Load LIFF SDK <script src="https://d.line-scdn.net/liff/1.0/sdk.js><script>
  • 14. 2. Prepare Canvas <script src="https://cdn.jsdelivr.net/npm/signature_pad@2.3.2/dist/ signature_pad.min.js"></script> <script> const canvas = document.querySelector('#canvas'); const signaturePad = new SignaturePad(canvas, { backgroundColor: 'rgb(238,238,238)', }); $(window).on('load', function(){ canvas.setAttribute('width', $('.container').width()); canvas.setAttribute('height', window.innerHeight - $('#btn').outerHeight() - 10); signaturePad.clear(); liff.init(function (data) {}); }); </script>
  • 15. 3. Call LIFF API liff.getProfile().then(function (profile) { liff.sendMessages([ { type: 'image', originalContentUrl: 'https://' + document.domain + '/imgs/' + res + '.jpg', previewImageUrl: 'https://' + document.domain + '/imgs/' + res + '_240.jpg' }, { type: 'text', text: 'From:' + profile.displayName } ]).then(function () { liff.closeWindow(); }})
  • 16. 4. Handle Save Image if not os.path.exists(dir_name): os.makedirs(dir_name) with open(os.path.join(dir_name, '{}.jpg'.format(img_name)), 'wb') as img: img.write(base64.b64decode(event['image'].split(",")[1])) original = Image.open(os.path.join(dir_name, '{}.jpg'.format(img_name))) original.thumbnail((240, 240), Image.ANTIALIAS) original.save(os.path.join(dir_name, '{}_240.jpg'.format(img_name)), 'JPEG') return make_response(img_name, 200)
  • 17. 5. Registration LIFF App # Request curl -XPOST -H "Authorization: Bearer {CHANNEL_ACCESS_TOKEN}"  -H "Content-Type: application/json"  -d '{     "view": {         "type": "full",         "url": "https://example.com/myservice"     } }' https://api.line.me/liff/v1/apps # Response {“liffId”:”0123456789-nXjrqEEr”} # LINE Scheme line://app/0123456789-nXjrqEEr