Discourse integration in website

javascript

(UserXtreamz) #1

Hi I tries to integrate with normal website using the following code.

<div id="discourse-comments"></div>

<script type="text/javascript">
  var discourseUrl = "http://fishtank.eviltrout.com/",
      discourseEmbedUrl = 'http://eviltrout.com/link-to-blog-entry.html';

  (function() {
    var d = document.createElement('script'); d.type = 'text/javascript'; d.async = true;
      d.src = discourseUrl + 'javascripts/embed.js';
    (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(d);
  })();
</script>

Its showing the comments from the discourse only when the user is logged in . When the user user logged out it’s not showing the discourse comments in my site . How can i solve this issue?


(Robin Ward) #2

Does your site require users to log in? If you are not logged in can you see the topic you are trying to embed?