Refused to display..... frame-ancestors https://www.facebook.com Refused to display..... frame-ancestors https://www.facebook.com wordpress wordpress

Refused to display..... frame-ancestors https://www.facebook.com


There are two things required to avoid this message:

  1. Ensure you have the correct Facebook page ID set in your HTML. This should be the numeric ID, not what you see in the URL. I found my page's numeric ID via https://findmyfbid.com

    Example:

    <div class="fb-customerchat" page_id="6708927376315932"></div>
  2. Whitelist your domain at Your Page > Settings > Messenger Platform. Ensure this matches your domain, uses HTTPS protocol, and include the port too if using a non-standard port.(And then make sure you hit the Save button!)


There are several things:

  1. Ensure Facebook page is Published
  2. Under Facebook page settings (Messenger Platform), add your domain. MUST be https:// Make sure domain name matches exactly including www (or lack thereof).
  3. Use correct app_id
  4. Use this page_id (from steps 3 and 4)

If chat plugin works for you and no one else, it's probably because you're logged into FB and you're the page admin. Check steps 1 & 2.


Some of the common things

  • whitelist the domain name

  • Facebook page is publicly visible

  • correct page id (you should use numeric ID, not textual one in the URL, if that's what you happen to have)

  • referrer policy is not set to "no-referrer"

    some other reasons,

  • page not loading through https

  • multiple facebook sdk are added

source, more info