Violates the following Content Security Policy - Messenger Chatbot in your website - Ayush Shrestha || UI/UX || Front-end || Angular || React || Wordpress

Violates the following Content Security Policy – Messenger Chatbot in your website

while you add chatbot message box in your website it it didnt work if you check console and it says that

https://www.facebook.com/v2.12/plugins/customerchat.php?app_id=&attribution=setup_tool&channel=https%3A%2F%2Fstaticxx.facebook.com%2Fconnect%2Fxd_arbiter.php%3Fversion%3D44%23cb%3Df13ed322c49f5e%26domain%3Dwww.floristnepal.com%26origin%3Dhttps%253A%252F%252Fwww.floristnepal.com%252Ff173aec3cd4b68%26relation%3Dparent.parent&container_width=0&locale=en_US&page_id=398777027226348&sdk=joey

in a frame because an ancestor violates the following Content Security Policy directive: “frame-ancestors https://www.facebook.com”.

SOLUTION :

You should whitelist your domain
https://developers.facebook.com/docs/messenger-platform/messenger-profile/domain-whitelisting

1) Click Settings at the top of your Page

2) Click Messenger Platform on the left

3) Edit whitelisted domains for your page in the Whitelisted Domains section

Leave a Reply