【コピペ用】LIFF & LINEログイン
index.html
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script charset="utf-8" src="https://static.line-scdn.net/liff/edge/2/sdk.js"></script>
</head>
<body>
<h1 id="title">ログインしていません</h1>
<script src="./index.js"></script>
</body>
</html>
index.js
liff.init({ liffId: "LIFF_ID" })
.then(() => {
if (!liff.isLoggedIn()) {
liff.login();
} else {
document.getElementById('title').textContent = 'ログイン済み';
}
})
いただいたサポートは、自己投資と災害復興支援に使わせていただきます。