X-Frame-Options:从 Facebook 应用程序在 Twitter 上发布
我希望能够通过我目前正在开发的 Facebook 应用程序向用户发布 Twitter feed,但似乎遇到了麻烦。当我调用 tmhOAuth PHP 脚本来验证 Twitter 上的权限请求时,出现以下错误:
Refused to display document because display forbidden by X-Frame-Options
直接从浏览器调用时,TmhOAuth 工作正常。它的标头函数在 Facebook iframe 内失败。
知道发生了什么事吗?
I want to be able to post on users Twitter feed from a Facebook app i'm developing at the moment but seem to be having trouble. When I call my the tmhOAuth PHP script to authenticate ask for permissions on Twitter I get the following error:
Refused to display document because display forbidden by X-Frame-Options
TmhOAuth works perfectly when its called directly from the browser. Its the header function that fails inside the Facebook iframe.
Any idea whats going on?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
出于网络钓鱼的原因,Twitter 不允许将其 OAuth 授权页面包含在框架内。您需要在 Facebook 画布之外的新窗口中打开 OAuth 流程。
Twitter doesn't allow their OAuth authorization page to be contained within a frame, for phishing reasons. You need to open the OAuth flow in a new window, outside of Facebook's canvas.