客户端Facebook“喜欢门”没有https

时间:2014-08-20 22:45:08

标签: javascript facebook facebook-javascript-sdk

我试图设置一个像#gate;#34;用户在看到网站上的某些内容之前必须喜欢某个页面(而不是Facebook本身)。我已经在其他地方找到了一些关于如何做的很好的资源,但我遇到了httphttps的问题。我的网站没有加载https,但Facebook登录弹出窗口是。错误:

Uncaught SecurityError: Failed to read the 'contentDocument' property from 'HTMLIFrameElement': Blocked a frame with origin "http://yoursite.com" from accessing a frame with origin "http://static.ak.facebook.com". The frame being accessed set "document.domain" to "facebook.com", but the frame requesting access did not. Both must set "document.domain" to the same value to allow access.

我目前正在使用此处的代码:https://github.com/vavrecan/facebook-fangate,但也发现this answer有用。

如果用户不喜欢使用https,那么只有在他们喜欢特定的Facebook页面时才能显示用户内容?

1 个答案:

答案 0 :(得分:1)

通过平台政策不鼓励喜欢门控,并且通过SignedRequests的Like-gate将于2014年11月6日停止工作。请查看我的回答

How to check if people liked my Facebook FanPage

错误本身是关于CORS而不是HTTP与HTTPS imho。

相关问题