拒绝显示在一个框架,因为它设置'X框架选项'到DENY facebook fb.ui共享方法 [英] Refused to display in a frame because it set 'X-Frame-Options' to DENY facebook fb.ui share method

查看:361
本文介绍了拒绝显示在一个框架,因为它设置'X框架选项'到DENY facebook fb.ui共享方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在控制台中接收到此消息:由于将X-Frame-Options设置为DENY而拒绝在框架中显示

Receiving this message in the console: Refused to display in a frame because it set 'X-Frame-Options' to DENY

在移动版本中显示,如果用户代理是移动设备,则只是一组不同的html和资源。

This happens when the site is being shown in the mobile version, its just a different set of html and assets served up if the user agent is a mobile device.

它显示m.facebook.com控制台错误消息。

It does display m.facebook.com in the console error message.

FB.ui(
{
    method: 'share',
    href: 'https://www.espn.com/mlb',
},
    function(response) {
        if (response && !response.error_code) {
          console.log('shared_post');
          //facebook_post_to_fanpage(access_token_data, link_id, song);
          return true;
        } else {
          return false;
        }
    }
);      

我可以在手机版的网站上使用FB.api,和getauth没有任何问题,但它给我适合,当我尝试使用FB.ui,共享和饲料方法。

I am able to use the FB.api on the mobile version of the site, as well as login and getauth without any problem, but it gives me fits when I try to use FB.ui, both the share and feed methods.

我想我会在

推荐答案

我得到了我的解决方案从这篇文章:加载Iframe Facebook(X-Frame-Options拒绝加载)

I got my solution from this post: Loading Iframe Facebook (Load denied by X-Frame-Options)


我有同样的问题,它固定,当我使用target =_ top的链接,它现在工作完美。 p>

I got the same issue, and it got fixed, when i used target="_top" for the link , and it is now working perfectly.

这篇关于拒绝显示在一个框架,因为它设置'X框架选项'到DENY facebook fb.ui共享方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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