7 Replies Latest reply on Aug 14, 2016 10:37 PM by xkevin

    Facebook comment plugin

    xkevin Level 1

      I am using this plugin on my website. This will enable people to write their comment on fb comment box. Is it possible to include this in html?

      This link will give me you the comment plugin code: https://developers.facebook.com/docs/plugins/comments#configurator


      Here is an example:

      <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/tl_PH/sdk.js#xfbml=1&version=v2.7";

        fjs.parentNode.insertBefore(js, fjs);

      }(document, 'script', 'facebook-jssdk'));</script>


      <div class="fb-comments" data-href="https://developers.facebook.com/docs/plugins/comments#configurator" data-numposts="5"></div>


      At first I have an error here. I just changed this line:

      js.src = "//connect.facebook.net/tl_PH/sdk.js#xfbml=1&version=v2.7"; to  js.src = "https://connect.facebook.net/tl_PH/sdk.js#xfbml=1&version=v2.7";


      The error disappeared but still the comment box doesn't show.

      They say It should not be run locally and you need to host your html file on a server.


      If hybrid app don't have host, how can it make show the comment box?