isdaviddong
12/30/2017 - 6:16 AM

index.html

index.html

<html>
<head>
    <title></title>
    <meta charset="utf-8" />
    <script>
        function Auth() {
            var URL = 'https://access.line.me/oauth2/v2.1/authorize?';
            URL += 'response_type=code';
            URL += '&client_id=1554713403';  //請換成你自己的 client_id
            URL += '&redirect_uri=http://localhost:58155/Callback.aspx'; //請換成你自己的 callback url
            URL += '&scope=openid%20profile';
            URL += '&state=abcde';
            //導引到LineLogin
            window.location.href = URL;
        }
    </script>
</head>
<body>
    <button onclick="Auth();">點選這裡連結到LineLogin</button>
</body>
</html>