【发布时间】:2016-10-29 17:21:47
【问题描述】:
我按照https://developers.facebook.com/docs/instant-articles/reference/social 的说明进行操作 和相关的 https://developers.facebook.com/docs/plugins/embedded-posts#add-code-manually 在即时文章中嵌入 Facebook 视频。这是我最终嵌入的内容,但不幸的是,当我预览页面时,我会在视频应该出现的位置出现短暂的灰色闪光,然后没有视频。
<!-- Article body goes here --><figure class="op-social">
<iframe>
<!-- Include Facebook embed code here. Your Facebook embed code should contain both the "JavaScript SDK" and the "Embedded Post Tag" parts described at https://developers.facebook.com/docs/plugins/embedded-posts#add-code-manually -->
<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/en_US/sdk.js#xfbml=1&version=v2.6&appId=906632809405090";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<div class="fb-post" data-href="https://www.facebook.com/PopSugarCelebrity/videos/10154334075529824/0506729/" data-width="300" data-show-text="true"></div>
</iframe>
</figure>
<p>Ernestine Shepherd, one of the world's oldest bodybuilders, turned 80 this month—and she's making us all want to hit the gym. While we're not about to join her for 3 a.m. workouts or 10-mile runs (did we mention she's a badass?), Shepherd's story is a great reminder that it's never too late to adopt healthy habits. She didn't start exercising until she was 56! </p>
我已经成功地将 youtube、twitter 和 instagram 嵌入到我们的各种 FBIA 页面中,所以我认为 fb 视频应该很容易,但没有这样的运气。是否有人在 FBIA 页面上成功嵌入了 FB 视频,对我在上面的代码中哪里出错有一些提示?
【问题讨论】:
标签: video-embedding facebook-instant-articles