且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Facebook页面插件 - 拒绝显示在框架中,因为它将'X-Frame-Options'设置为'sameorigin'

更新时间:2022-10-16 23:29:26

当我将插件放入 web site 。无论我试图修改插件代码还是在 fanpage a>,它始终存在的错误。

 拒绝显示'https://www.facebook.com/xti.php ?...'
,因为它将'X-Frame-Options'设置为'sameorigin'。

幸运的是,我在 blogspot wordpress ,当我插入插件时没有错误。所以我只是比较它们,发现问题是由于时间轴


将代码中没有时间轴标签的插件放入代码中(在选项中删除它)

在我的情况下,虽然我的时间线不再显示,但错误消失了。没有选择。




So here is my website which i have embeded the Page Plugin in the right column: https://trade.z.com/hk/tc/

It works perfectly in other browsers but not in Chrome. Wait for a few mins and there will be an error prompted in the the developer tool's console. Full error message as below:

Refused to display 'https://www.facebook.com/xti.php?xt=AZVp-LKocyBZqjT4dWwYI35ld4DtHr-18CJRT0Hkj94pDsEg0xQ6Huxs6yrp3fmq2cu7K5mYZ5FLGEpwTSBVR2q-ixCw8zf7TeQTEeE5mS3CUStk4vjo06NfLORxOEtFkK-ra_zb5E5lpxmLr6DyPkPd9KougTl8hhhe-Jv1AE1Zl-skzEHvVMRlJ6EoPH0UTSD23MhqQKSjL1R-egZRDSLD9FH3JR267SA7H9a5gZysuA8Daf999a4FP6WkyHYmQC8mtmMb_UMIeycl8qnakxN7vXZEK0xY8SI6dpDkgMDiZQyWpFatzx8ESy7b7eBRHJfam5Ru_AkgC7c4UeoE8dYlSyWtKDoTGyio2nH_02YMfd9OSPkBQZcjOhSCb1gLO9f9w07QxHK6q7pS6i3p2KS-UhfPncspgcQI-4k8qbQG-DZrZlHtGCXJloZB9hSwtZ68pTG8wtnCunKF5YSJuAZ5sAsFqYFsmkUrB-tExVIKTQJH413awON4bHNTcbHdx306leBNXemENdLL8QMkZPkAtVTYKKD3x7_Ii_dMwznfY2bb_0KFWGM--_ilgWJvx9ostH-iKsrGnbeToaodNu0cD9CI4wIGPtDkr47hSp7RDUaLMCIdzcMlnHjvPIajE4BcgGwo_LlNpxItVkStkA_cIEFbhEh4fHPk-Cka39TRVg&isv=1&cts=1512539623&csp' in a frame because it set 'X-Frame-Options' to 'sameorigin'.

Is there a way I can solve this error? I tried to do edits on my website's Apache and it didn't work. Please help.

I got the same error when I put the plugin in my web site. Whatever I tried to modify either the plug in code or do something in the fanpage, the error it always remain.

Refused to display 'https://www.facebook.com/xti.php?...' 
in a frame because it set 'X-Frame-Options' to 'sameorigin'.

Just lucky, there are blog site I have in blogspot and wordpress which has no error when I put the plugin. So I just compared them and found the problem caused is all about the timeline:

Put the plugin without timeline tabs in the code (delete it in the option)

In my case although my timeline is no more show up but the error is gone. No choice..