Sign in

How to add facebook comments

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #3726
    kosi77

    Hello! I’m trying to add code for comments from Facebook but it doesn’t work.

    Where do I have to add the code to work for each page separately?

    Thanks …

    #3771
    Tomasz DziudaTomasz Dziuda
    Moderator

    Tools -> Custom HTML -> check if you have tab “After every post” – if yes, you can put there facebook comments code 🙂

    --
    Do you appreciate the support you've received today? If so, consider donating to the Publii team by clicking here; we'll be sure to use your donation to make Publii even better!

    #3774
    kosi77

    How to change the url address to display correctly for each post?

    Example:

    <script async defer crossorigin=”anonymous” src=”https://connect.facebook.net/bg_BG/sdk.js#xfbml=1&version=v8.0&#8243; nonce=”XuZ6N5rN”></script>

    #3775
    Tomasz DziudaTomasz Dziuda
    Moderator

    I suppose that the only way is create script tag dynamically and use window.location to get a proper URL

    e.g:

    var scr = document.createElement(‘script’);
    scr.setAttribute(‘src’, window.location.href + ‘/test.js’);
    document.body.appendChild(scr);

    --
    Do you appreciate the support you've received today? If so, consider donating to the Publii team by clicking here; we'll be sure to use your donation to make Publii even better!

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.