Refused to display… frame-ancestors https://www.fa

2020-02-20 08:22发布

I have included Facebook customer chat plugin on my website. It works fine for the first day. From the second day, it's not working. I have seen an error message in Google Chrome console:

Refused to display 'https://www.facebook.com/v2.11/plugins/customerchat.php?app_id=214160985792954&channel=https%3A%2F%2Fstaticxx.facebook.com%2Fconnect%2Fxd_arbiter%2Fr%2FlY4eZXm_YWu.js%3Fversion%3D42%23cb%3Df157c0f5ff1898c%26domain%3Dwww.fast-pay.cash%26origin%3Dhttps%253A%252F%252Fwww.fast-pay.cash%252Ff11cff6d515fe88%26relation%3Dparent.parent&container_width=0&locale=en_US&minimized=false&ref=front-page&sdk=joey' in a frame because an ancestor violates the following Content Security Policy directive: "frame-ancestors https://www.facebook.com/"."

I googled the solution. Every answer I have seen that this is domain white listing problem. But I have whitelisted my domain in facebook page.

Here is the process how I white listed my domain

  1. First I go to my page settings
  2. Under messenger platform settings I put my domain name for whitelisting
  3. I have put my domain name in several patterns. Here I give you my patterns

    1. https://www.my-domain.com/
    2. https://www.my-domain.com/
    3. https://my-domain.com/
    4. http://www.my-domain.com/
    5. http://my-domain.com/

Here is the console error image enter image description here

10条回答
爷、活的狠高调
2楼-- · 2020-02-20 09:20

Make sure your FB page is published.

查看更多
一夜七次
3楼-- · 2020-02-20 09:20

Some of the common things

  • whitelist the domain name
  • Facebook page is publicly visible
  • correct page id
  • referrer policy is not set to "no-referrer"

    some other reasons,

  • page loads through https
  • multiple facebook sdk are added

source, more info

查看更多
Evening l夕情丶
4楼-- · 2020-02-20 09:21

I had the same problem. If you click that in the console you'll see it says: Parameter page_id: Invalid id: <107153046051560>

The problem was simply the <>. I removed that so its:

And it worked. Hope it works for you too. Regards

查看更多
Evening l夕情丶
5楼-- · 2020-02-20 09:23

You didn't mention anything about using additional plugins or CMS. Are you using plain PHP or CMS like WordPress? I wonder there might be an issue with your incorrect configuration. Please Re-check your Facebook Page Id. For any additional plugin, make sure to turn it on.

查看更多
登录 后发表回答