If you use PHP, this is the code that asks for the URL of the current page and then links Facebook comments to it:
<?PHP $url = $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI']; echo "<div class='fb-comments' data-href='$url' data-num-posts='10' data-width='470'></div>"; ?>
This works if your dynamic content contains only one query string (e.g. product =). If it has more query lines for the same page, for example, & sort = to sort the parameters, then this will not work as the Facebook comment, which will be displayed when sorting in ascending order, will not be displayed in the descending sort option , for example.
You can solve this part by assigning a base URL for this product, and then showing FB comments for that URL on all dynamic pages with this product. For example, are you requesting FB comments for the page? Product = 13 & sort = asc & type = 34, even if the types & sort and & are different on this page.
source share