Skip to content

Commit

Permalink
add messenger customer chat plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
jigsawye committed Jul 8, 2019
1 parent 9932b9f commit a7834ab
Showing 1 changed file with 32 additions and 1 deletion.
33 changes: 32 additions & 1 deletion public/index.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!DOCTYPE html>
<html lang="en">
<html lang="zh-TW">

<head>
<!-- Global site tag (gtag.js) - Google Analytics -->
Expand Down Expand Up @@ -38,7 +38,38 @@
<noscript>
You need to enable JavaScript to run this app.
</noscript>

<!-- Load Facebook SDK for JavaScript -->
<div id="fb-root"></div>
<script>
window.fbAsyncInit = function() {
FB.init({
xfbml : true,
version : 'v3.3'
});
};

(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = 'https://connect.facebook.net/zh_TW/sdk/xfbml.customerchat.js';
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
</script>

<!-- Your customer chat code -->
<div
class="fb-customerchat"
attribution=setup_tool
page_id="641107736388871"
theme_color="#000000"
logged_in_greeting="你好,有任何建議或問題嗎?"
logged_out_greeting="你好,有任何建議或問題嗎?">
</div>

<div id="root"></div>

<!--
This HTML file is a template.
If you open it directly in the browser, you will see an empty page.
Expand Down

0 comments on commit a7834ab

Please sign in to comment.