Error Embedding

Can someone let me know what I’m doing wrong here. I keep getting an error for some reason…

The code in your final screenshot is showing the URL of a Discourse topic as the value of the discourseEmbedUrl. The discourseEmbedUrl should be set to the canonical URL of the page you are adding that code snippet to. For example, if the URL of the post you are adding the snippet to was, that is the value that you would use for the discourseEmbedUrl.

It also looks like there may be a formatting issue in your code snippet. Notice the large amount of space between the opening ' and the beginning of the URL.


Thanks for the quick response!
I just tried that and unfortunately get the same error with this:

Your discourseEmbedUrl is still set to the URL of a topic on your Discourse site. It looks to me like that is the topic that you are wanting to create on Discourse, but you need to set it to the canonical URL of blog post that you are adding the code to.

Have a look at this topic for details: Embedding Discourse Comments via Javascript. Possibly what you are wanting to do is what is outlined in the (Alternate Configuration) Linking to existing topics section of that topic. In that case, you need to add a topicId parameter to the script. That parameter should be set to the id of the existing Discourse topic that you’d like to use.

1 Like