作者今天介紹一個Wordpress網站的小工具;Line Button按鈕
這是甚麼呢? 就是在您的網頁中,在右下角或左下角有沒有看過一個小按鈕。可以會是與服務人員對話 或是 加入群組的一個彈出小視窗。


上圖都是網頁呈現出的小按鈕喔! 今天來增加都您的網頁吧!
Step.1 先創建好自己的API;這篇使用的是LINE
先登入您的LINE帳號 (developers.line)並創建好一個LINE群組




Step.2將Bot Basic ID複製起來
喔

選擇您要使用的Button

將ID貼製下方框框 @ 後面

調整您Button的形式

即可創建Html語法

由於官方已經停止免費提供,所以提供下方的語法協助喔
請將其中 @你的LINE官方帳號 的部分改為自己的帳號即可。
<!-- GetButton.io widget -->
<script type="text/javascript">
(function () {
var options = {
line: "https://line.me/ti/p/@你的LINE官方帳號", // Line QR code URL
call_to_action: "立即聯絡我", // Call to action
button_color: "#FF6550", // Color of button
position: "right", // Position may be 'right' or 'left'
};
var proto = 'https:', host = "getbutton.io", url = proto + '//static.' + host;
var s = document.createElement('script'); s.type = 'text/javascript'; s.async = true; s.src = url + '/widget-send-button/js/init.js';
s.onload = function () { WhWidgetSendButton.init(host, proto, options); };
var x = document.getElementsByTagName('script')[0]; x.parentNode.insertBefore(s, x);
})();
</script>
<!-- /GetButton.io widget -->
Step.3開啟WordPress安裝Button外掛
安裝Button外掛 並 啟用喔

貼上語法並儲存喔

最後網頁就會呈現出Button囉

文章留言區