Bui Duc Phuc CS
Bui Duc Phuc CS

Reputation: 31

Why my amp site with amp-facebook-comments not show?

My website at: https://2top.xyz

My issues:

<script async custom-element="amp-facebook-comments" src="https://cdn.ampproject.org/v0/amp-facebook-comments-0.1.js"></script>
    <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>

I don't know why this plugin not show, please help me! Thanks!

Note: this is my custom site I build with golang, upcloud vps and cloudflare cdn!

Upvotes: 1

Views: 273

Answers (1)

Bui Duc Phuc CS
Bui Duc Phuc CS

Reputation: 31

I resolved this issues myself. Because I didn't define width of parent <div> which contains the <amp-facebook-comments> component. So my final code is:

<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>

And it's working now!

Upvotes: 2

Related Questions