为什么我的带有 amp-facebook-comments 的 amp 网站没有显示?
Why my amp site with amp-facebook-comments not show?
我的网站位于:https://2top.xyz
我的问题:
AMP Facebook 评论插件未显示
测试站点:https://2top.xyz/dieu-khoan-cung-cap-va-su-dung-dich-vu-tai-website-2top.1574766128301
我在 https://amp.dev/documentation/examples/components/amp-facebook-comments/?format=websites 阅读,我的代码是:
在header:
<script async custom-element="amp-facebook-comments" src="https://cdn.ampproject.org/v0/amp-facebook-comments-0.1.js"></script>
- 在我的 body post:
<amp-facebook-comments width="486"
height="657"
layout="responsive"
data-href="https://2top.xyz/dieu-khoan-cung-cap-va-su-dung-dich-vu-tai-website-2top.1574766128301">
</amp-facebook-comments>
我不知道为什么这个插件不显示,请帮助我!谢谢!
注意:这是我使用 golang、upcloud vps 和 cloudflare cdn 构建的自定义站点!
我自己解决了这个问题。因为我没有定义包含 <amp-facebook-comments>
组件的父 <div>
的宽度。所以我的最终代码是:
<div class="comment" style="width:100%">
<amp-facebook-comments
width="480"
height="720"
layout="responsive"
data-href="https://2top.xyz/dieu-khoan-cung-cap-va-su-dung-dich-vu-tai-website-2top.1574766128301">
</amp-facebook-comments>
</div>
现在可以使用了!
我的网站位于:https://2top.xyz
我的问题:
AMP Facebook 评论插件未显示
测试站点:https://2top.xyz/dieu-khoan-cung-cap-va-su-dung-dich-vu-tai-website-2top.1574766128301
我在 https://amp.dev/documentation/examples/components/amp-facebook-comments/?format=websites 阅读,我的代码是:
在header:
<script async custom-element="amp-facebook-comments" src="https://cdn.ampproject.org/v0/amp-facebook-comments-0.1.js"></script>
- 在我的 body post:
<amp-facebook-comments width="486"
height="657"
layout="responsive"
data-href="https://2top.xyz/dieu-khoan-cung-cap-va-su-dung-dich-vu-tai-website-2top.1574766128301">
</amp-facebook-comments>
我不知道为什么这个插件不显示,请帮助我!谢谢!
注意:这是我使用 golang、upcloud vps 和 cloudflare cdn 构建的自定义站点!
我自己解决了这个问题。因为我没有定义包含 <amp-facebook-comments>
组件的父 <div>
的宽度。所以我的最终代码是:
<div class="comment" style="width:100%">
<amp-facebook-comments
width="480"
height="720"
layout="responsive"
data-href="https://2top.xyz/dieu-khoan-cung-cap-va-su-dung-dich-vu-tai-website-2top.1574766128301">
</amp-facebook-comments>
</div>
现在可以使用了!