瀏覽天

六月 18, 2019

line notify 開發設定

參考自

http://studyhost.blogspot.com/2016/12/linebot6-botline-notify.html

http://white5168.blogspot.com/2016/12/line-notify-1.html#.XN80T44zbIU

 

設定時網站可以用 localhost 就好

建立一個新的 line 群組

記得要把 line notify 邀請到群組

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script>
        function oAuth2() {
            var URL = 'https://notify-bot.line.me/oauth/authorize?';
            URL += 'response_type=code';
            URL += '&client_id=開發頁面給的';
            URL += '&redirect_uri=http://localhost:5500';
            URL += '&scope=notify';
            URL += '&state=abcde';
            window.location.href = URL;
        }
    </script>
</head>
<body>
    <button onclick="oAuth2();">連結到LineNotify按鈕</button>
</body>
</html>