Facebook SDK FB.GetLoginStatus X-Frame-Options拒绝加载(仅限Firefox) [英] Facebook SDK FB.GetLoginStatus Load denied by X-Frame-Options (Firefox Only)

查看:100
本文介绍了Facebook SDK FB.GetLoginStatus X-Frame-Options拒绝加载(仅限Firefox)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有这个Web应用程序登录页面,在文档加载完成后从Facebook JavaScript SDK调用FB.GetLoginStatus()。这在所有浏览器(包括移动设备)上运行得非常好,从那以后就很开心了。

I have this web application login page that calls FB.GetLoginStatus() from the Facebook JavaScript SDK after the document is done loading. This worked perfectly fine on all browsers (mobile included) and that was the happily ever after.

但是,有一天,出于无处不在,我注意到SDK是页面加载完成后无法获取Facebook用户的登录状态数据。我看一下控制台,我看到的是

BUT, one day, out of plain nowhere, I notice that the SDK is failing to get the login status data of the Facebook user when the page is done loading. I take a look in the console and I see something around the lines of


X-Frame-Options拒绝加载[大量链接由SDK]
不允许框架。

Load denied by X-Frame-Options [massive link generated by the SDK] does not permit framing.

这就是我的错误:这在Safari中运行得非常好。我在Chrome上打开网页应用时遇到了错误(与上面引用的错误相同,措辞略有不同)。我试过Firefox并得到同样的东西。我花了几个小时试图找到原因但失败了,然后去睡觉了。

Here's what bugs me: this works perfectly fine in Safari. I was introduced to the error when I opened the web app on Chrome (same error as quoted above, slightly different wording). I tried on Firefox and got the same thing. I spent a few hours trying to find a cause but failed and went to sleep.

我第二天醒来,奇迹般地它现在正在使用Chrome(?)而我没有做过任何更改(?!)。但是,出于某种原因,错误现在只在Firefox中存在。

I wake up the next day and miraculously it's now working on Chrome (?) without me having done any changes (?!). But, for some reason, the error persists only in Firefox now.

有没有人知道这可能是什么? Firefox与Safari不同的东西不同吗?

Does anyone have a clue what this might be? Something that Firefox does differently that Safari and Chrome don't?

这里的一个线索是我正在使用隧道服务(ngrok)而我没有为它签名证书,因此我得到了随便(你进入'不安全'的网站,等等等等)。也许Firefox阻止SDK,因为连接不安全?

A clue here is that I'm using a tunneling service (ngrok) and I don't have a signed certificate for it, thus I get the casual (you're entering an 'unsafe' website, blah blah blah). Perhaps Firefox is blocking the SDK because the connection is not secure?

这篇关于Facebook SDK FB.GetLoginStatus X-Frame-Options拒绝加载(仅限Firefox)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆