may be above answer we added is not perfect,
wp-chatbot plugin builds based on Messenger customer chat
https://developers.facebook.com/docs/messenger-platform/discovery/customer-chat-plugin
and pass values to sdk based on plugin settings. like page id, app id, …
wp-chatbot plugin adds similar content on your website
<script>
window.fbAsyncInit = function() {
FB.init({
appId : 'your-app-id',
autoLogAppEvents : true,
xfbml : true,
version : 'v3.1'
});
};
(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/en_US/sdk.js";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
</script>
<div class="fb-customerchat"
page_id="<PAGE_ID>">
</div>
very similar to this number of lines of code only, this plugin adds.
i.e. the plugin calls only one request – fb customer chat sdk, and that sdk may call other requests.
those things are not in our control to parse, minimize.
one way we can do – this may or may not work – but very hard to maintain bug fixes,
to get updates from facebook.
manually have to copy the content of this file
https://connect.facebook.net/en_US/sdk.js
and
have to check what other request this file is making and have to manually copy the content and have to modify
but it’s very hard to maintain the updates. when ever facebook make an adjustment, to get the updates we have to redo all the things – its very hard. bug fixes, updates may get delay.
e.g. its something like adding analytics tools, the analytics tools provide a few lines of code and we will add that in our website and that code may call other requests. that completely not in our hand.
simple answer:
that not completely in our hand.
Have a Great Day,
Thank You