我正在研究的网站有一个Facebook登录选项,但最近一位用户报告说它不适用于他们.我禁用了我的扩展等,我在控制台中遇到了这个错误:
Blocked a frame with origin "https://www.facebook.com" from accessing a frame
with origin "http://static.ak.facebook.com". The frame requesting access has
a protocol of "https", the frame being accessed has a protocol of "http".
Protocols must match.
Run Code Online (Sandbox Code Playgroud)
我可以提供给API的选项,使其能够在相同的协议上工作吗?仅供参考,主要网站运行在HTTP(无S)上.
这特别奇怪,因为它似乎突然停止工作(但有可能这总是一个问题因为我是新的并且正在学习这个系统).
我在页面底部有这个代码:
<div id="fb-root"></div>
<script>
window.fbAsyncInit = function() {
FB.init({
appId : ..., // App ID
status : true, // check login status
cookie : true, // enable cookies to allow the server to access the session
xfbml : true, // parse XFBML
channel: …
Run Code Online (Sandbox Code Playgroud)