-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdemoScript.html
More file actions
24 lines (24 loc) · 1.12 KB
/
Copy pathdemoScript.html
File metadata and controls
24 lines (24 loc) · 1.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<script async defer crossorigin="anonymous" src="https://connect.facebook.net/he_IL/sdk.js#xfbml=1&version=v6.0&appId=811987785971081&autoLogAppEvents=1"></script>
<script>
window.fbAsyncInit = function() {
FB.init({
xfbml: true,
version: 'v6.0'});
FB.getLoginStatus(function (response) {
if (response.status === 'connected') {
var e = document.getElementById("logintofb");
e.parentNode.removeChild(e);}});
(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/he_IL/sdk/xfbml.customerchat.js';
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
if (response.status === 'connected') {
FB.Event.subscribe('send_to_messenger',
function (e) {console.log(e);});
}
}
</script>