How to connect Disqus to Prismic

My app comments should stored in prismic using disque .(https://user-guides.prismic.io/en/articles/663142-how-to-add-a-comments-section-using-disqus) in this article not clear how it will connect disque and prismic?

Hi Team,

With Disqus you don't connect it directly to Prismic, your comments live within Disqus and you connect it to your website application with the embed code:

Let me know if you need any help implementing this.

Thanks.

Here's a full code example in react, it's just React + React Router.

In Disque comments system, can we add comment based on specific blog article??..

Yes, that's done by passing your UID to this section of the embed code:

    var disqus_config = function () {
        // Replace PAGE_URL with your page's canonical URL variable
        this.page.url = PAGE_URL;  
        
        // Replace PAGE_IDENTIFIER with your page's unique identifier variable
        this.page.identifier = PAGE_IDENTIFIER; 
    };
    */

You mentioned page url it can be dynamic like (http://example.com/helloworld.html?title=123) title will be changing based on article . can we use like that??...In disque only mentioned website url like (http://example.com/helloworld.html). will it work??..

Yes this will be changed as each dynamic page is printed so if you've returned your page content in a variable called document the above could be returned like:

    var disqus_config = function () {
        // Replace PAGE_URL with your page's canonical URL variable
        this.page.url = window.location.href;
        
        // Replace PAGE_IDENTIFIER with your page's unique identifier variable
        this.page.identifier = document.uid; 
    };
    */

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.