how to add facebook comment on pages

Discussion in 'General Support' started by skyhigh, Sep 27, 2019.

  1. skyhigh

    skyhigh Member

    Joined:
    Sep 28, 2010
    Messages:
    445
    Likes Received:
    8
    the code below will enable users to comment on pages items


    put this in header
    PHP:
    <div id="fb-root"></div>
    <
    script async defer src="https://connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.6"></script
    then this on the page
    PHP:
    <div class="panel padder">  <div class="fb-comments" data-href="{SITEURL}item.php?id={ID}"  data-width="100%" data-num-posts="10"></div></div>
                 
                  <
    script>
      $(
    ".fb-comments").attr("data-href"window.location.href);
      </
    script>
    have fun
     

Share This Page