Skip to content
LIFF(LINE Front-end Framework) SDK for local debugging.
TypeScript HTML
Branch: master
Clone or download
Latest commit 2e3408f Oct 5, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
dist
example add typescript source Oct 8, 2019
src add typescript source Oct 8, 2019
.gitignore add typescript source Oct 8, 2019
LICENSE add typescript source Oct 8, 2019
README.md add typescript source Oct 8, 2019
README_JA.md add typescript source Oct 8, 2019
feedback-openchat.png add typescript source Oct 8, 2019
package.json add typescript source Oct 8, 2019
tsconfig.json add typescript source Oct 8, 2019
yarn.lock add typescript source Oct 8, 2019

README.md

English | 日本語

liff-sdk-local

LIFF(LINE Front-end Framework) SDK for local debugging.

Features

Usage

Import

Download the latest release.

import dist/liff-sdk-local.min.js to your project.
and comment out origin LIFF SDK.

<!-- <script src="https://d.line-scdn.net/liff/1.0/sdk.js"></script> -->
<script src="path/to/liff-sdk-local.min.js"></script>
<script>
	liff.init(function(data) {
		// any process
	});
</script>

Customize return values

Use window.liffSettings to customize return values.

<script>
	window.liffSettings = {
		userId: 'U12345',
	};
</script>
<!-- <script src="https://d.line-scdn.net/liff/1.0/sdk.js"></script> -->
<script src="path/to/liff-sdk-local.min.js"></script>
<script>
	liff.init(function(data) {
		console.log(data.context.userId);
		// output: U12345
	});
</script>

following values in available.

  • userId
  • displayName
  • pictureUrl
  • statusMessage
  • accessToken
  • language
  • type
  • utouId
  • groupId
  • roomId
  • viewType

Feedback

LINE OpenChat: https://line.me/ti/g2/w1ox606Y6QvsyR7p8xdlog

License

The MIT License

You can’t perform that action at this time.