简体   繁体   English

iPad Safari和Chrome上的Facebook嵌入式帖子问题

[英]Facebook Embedded Posts issue on iPad Safari and Chrome

Facebook Embedded Posts seems to have an issue on iPads using Safari or Chrome. 在使用Safari或Chrome浏览器的iPad上,Facebook嵌入式帖子似乎存在问题。 If there is only one picture or video in the Facebook post, the picture slowly grows up to a certain width and destroys the complete layout. 如果Facebook帖子中只有一张图片或视频,则图片会慢慢增长到一定的宽度并破坏整个布局。

The code example to reproduce this behaviour is pretty simple and also based on the latest Facebook documentation: 重现此行为的代码示例非常简单,并且还基于最新的Facebook文档:

<!DOCTYPE html>
<html>

<head>
</head>

<body>

    <div id="fb-root"></div>
    <script>(function(d, s, id) {
        var js, fjs = d.getElementsByTagName(s)[0];
        if (d.getElementById(id)) return;
        js = d.createElement(s); js.id = id;
        js.src = "//connect.facebook.net/de_DE/all.js#xfbml=1";
        fjs.parentNode.insertBefore(js, fjs);
    }(document, 'script', 'facebook-jssdk'));</script>

    <div class="fb-post" data-href="https://www.facebook.com/Boulderplanet/photos/a.618483228200641.1073741838.148729438509358/620103224705308/?type=1" data-width="666"></div>

</body>

</html>

You can also find an example here: http://beta.climbster.net/fb_feed 您还可以在此处找到示例: http : //beta.climbster.net/fb_feed

Can please somebody help us to clarify this issue? 能否请别人帮助我们澄清这个问题? As Chrome on Android tablets as well as Chrome and Safari on iPhones do not have this issue, I am currently guessing it is a Facebook defect with the iFrame. 由于Android平板电脑上的Chrome以及iPhone上的Chrome和Safari没有此问题,因此我目前猜测这是iFrame的Facebook缺陷。

There is also no difference if the data-width parameter is set or not, neither wrapping the Facebook div in an own div with a fixed width is stopping the picture from continuously growing. 如果没有设置data-width参数也没有区别,将Facebook div包裹在固定宽度的div中也不会阻止图片连续增长。

Thank you! 谢谢!

I have filed this bug at Facebook and after check from their side it was accepted as valid bug. 我已在Facebook上提交了此错误,在他们检查后,它被视为有效错误。

see link 链接

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM