Sign in

How to add facebook comments

  • This topic has 3 replies, 2 voices, and was last updated 3 years, 2 months ago by .
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #3726
    Avatar photo[anonymous]

    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
    Avatar photoTomasz Dziuda

    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
    Avatar photo[anonymous]

    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
    Avatar photoTomasz Dziuda

    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.