Created
June 9, 2018 22:21
-
-
Save jansila/3c461f4b95bb88dcead47cc5f2ec7ac7 to your computer and use it in GitHub Desktop.
update fb chatplugin
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <head> | |
| </head> | |
| <script> | |
| window.fbAsyncInit = function() { | |
| FB.init({ | |
| appId : '210090072943719', | |
| autoLogAppEvents : true, | |
| xfbml : true, | |
| version : 'v3.0' | |
| }); | |
| var new_chat = document.createElement("div"); | |
| new_chat.id="new_chat" | |
| new_chat.className="fb-customerchat" | |
| new_chat.ref="new_ref"; | |
| new_chat.messenger_app_id=210090072943719; | |
| new_chat.page_id=233641140739847; | |
| document.getElementsByTagName('body')[0].appendChild(new_chat); | |
| FB.XFBML.parse(document.getElementById('new_chat')); | |
| console.log("new_ref is: ", document.getElementById("new_chat").ref); | |
| }; | |
| (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/cs_CZ/sdk.js"; | |
| fjs.parentNode.insertBefore(js, fjs); | |
| }(document, 'script', 'facebook-jssdk')); | |
| console.log("customer chatloading"); | |
| console.log("finished loading chat"); | |
| </script> | |
| <body> | |
| <div id="chat" class="fb-customerchat" | |
| messenger_app_id="210090072943719" | |
| logged_in_greeting="Ahoj, uz jsi lognuty" | |
| logged_out_greeting="Ahoj nejsi lognuty" | |
| greeting_dialog_display="fade" | |
| ref="default_ref" | |
| page_id="233641140739847"> | |
| </div> | |
| </body> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment