I am trying to implement a new Facebook Checkbox plugin on my aspx page, but I cannot show it on the screen. This error occurs on the client side, but the frame is hidden.
Error:
Displayed ' https://www.facebook.com/v2.9/plugins/messenger_checkbox.php?allow_login=true&app_id= ******* ....' in the frame because an ancestor violates the following Policy Directive Content Security: "frame-ancestors https://www.facebook.com "
What i have done so far:
<script> window.fbAsyncInit = function () { FB.init({ appId: '---MSGAPPID---', xfbml: true, version: 'v2.9' }); }; (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 = "//connect.facebook.net/en_US/sdk.js"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk') ); </script> <div class="fb-messenger-checkbox" origin="---Orgin url ------" page_id="--Pagelivefacebookid--" messenger_app_id="--Mssgappid--" user_ref="randomnumber" prechecked="true" allow_login="true" size="large"> </div>
In addition, I also added a domain whitelist, but, unfortunately, could not see it on my page. Suggest a better answer to get rid of this error.
https://developers.facebook.com/docs/messenger-platform/messenger-profile/domain-whitelisting
source share