Random topic creation by Facebook?

AI-generated summary

A user is experiencing an issue with their custom blog where Facebook shares of posts are randomly creating topics in Discourse, even though the comments are embedded from Discourse. These topics are duplicates and are created by the admin user. The issue arises when the post URL contains a Facebook variable (fbclid). netpositive reached out for help, and vinothkannans suggested setting the correct page URL for discourseEmbedUrl in the comment script. However, netpositive confirmed that discourseEmbedUrl is properly set. vinothkannans then advised against including query strings in discourseEmbedUrl and provided a possible solution using window.location.href.split(/[?#]/)[0].

Hello,

the comments are provided by Discourse on our custom blog. Everytime when a new post is shared on the Facebook the user visits from FB URL (the valid URL of the post + fbclid variable) randomly create topics in Discourse like when a new post is created on the blog. They’re actually created by the admin user as normally, but the post URL contains the FB variable mentioned above. When somebody clicks on that link then it takes to the blog post but the Discourse comment section doesn’t show up.

It’s pretty annoying because if a post gets more views then it pollutes the forum with “fake”/duplicate topics.

I’m pretty clueless with this problem :worried: Any thoughts?

You should set correct page URL for discourseEmbedUrl in the comments script. You shouldn’t blindly pass current browser URL as the value.

The discourseEmbedUrl is properly set on the blog pages. The problematic URL look like http://example.com/blog/post/?fbclid=uFCrBkUgEvKg...

It shouldn’t include query string in discourseEmbedUrl property. You should do something like below