'Facebook Send-to-messenger social plugin not working in incognito/private modes or mobile browsers

I am using the code below (as it is generated by Facebook) to show a Send To Messenger button to trigger a webhook on my side. It is working perfectly on normal desktop browsers but on incognito/private mode it is not working. It is also not working on mobile browsers (chrome, safari etc). Other facebook plugins like the login button works just fine on incognito/private/mobile. It is just the send to messenger button that is not working. Any help or guidance would be appreciated.

<div class="fb-send-to-messenger" 
messenger_app_id="APP_ID_HERE"
page_id="PAGE_ID_HERE"
data-ref="DATA_REF_HERE"
color="blue"
size="large"
allow_login="true"
cta_text="SUBSCRIBE_TO_UPDATES">
</div>
<script>
    window.fbAsyncInit = function() {
        FB.init({
            appId            : 'APP_ID_HERE',
            autoLogAppEvents : true,
            xfbml            : true,
            version          : 'v12.0'
        });
        FB.Event.subscribe('send_to_messenger', function(e) {
            if (e.event == "opt_in") {
                console.log(e.event);
            }
        })
    };
</script>
<script async defer crossorigin="anonymous" src="https://connect.facebook.net/el_GR/sdk.js"></script>

It is not throwing any console errors and it looks like it is generating some elements on the page but nothing is visible:

<div class="fb-send-to-messenger fb_iframe_widget" messenger_app_id="APP_ID" page_id="PAGE_ID" data-ref="DAT_REF_HERE" color="blue" size="large" allow_login="true" cta_text="SUBSCRIBE_TO_UPDATES" fb-xfbml-state="rendered" fb-iframe-plugin-query="app_id=APP_ID&amp;color=blue&amp;container_width=1520&amp;cta_text=SUBSCRIBE_TO_UPDATES&amp;locale=el_GR&amp;messenger_app_id=APP_ID&amp;page_id=PAGE_ID&amp;ref=DAT_REF_HERE&amp;sdk=joey&amp;size=large"><span style="vertical-align: bottom; width: 0px; height: 0px;"><iframe name="f2d3f1230f015b8" width="1000px" height="1000px" data-testid="fb:send_to_messenger Facebook Social Plugin" title="fb:send_to_messenger Facebook Social Plugin" frameborder="0" allowtransparency="true" allowfullscreen="true" scrolling="no" allow="encrypted-media" src="https://www.facebook.com/v12.0/plugins/send_to_messenger.php?app_id=APP_ID&amp;channel=https%3A%2F%2Fstaticxx.facebook.com%2Fx%2Fconnect%2Fxd_arbiter%2F%3Fversion%3D46%23cb%3Df24ae6c42e5df5c%26domain%3Dwww.domain_name.com%26is_canvas%3Dfalse%26origin%3Dhttps%253A%252F%252Fwww.domain_name.com%252Ff21301145a2371%26relation%3Dparent.parent&amp;color=blue&amp;container_width=1520&amp;cta_text=SUBSCRIBE_TO_UPDATES&amp;locale=el_GR&amp;messenger_app_id=APP_ID&amp;page_id=PAGE_ID&amp;ref=DAT_REF_HERE&amp;sdk=joey&amp;size=large" style="border: none; visibility: visible; width: 0px; height: 0px;" class=""></iframe></span></div>

<div id="fb-root" class=" fb_reset"><div style="position: absolute; top: -10000px; width: 0px; height: 0px;"><div></div></div></div>


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source