I installed facebook comments on my website. My website is a dynamic website and pages are like this www.example.com/page?id=54, www.example.com/page?id=67.
If I post a comment in this page: www.site.com/page?id=54, it also appears in www.example.com/page?id=67. The comments are not unique for a page, but appear in every page
i saw the question : Facebook comments, for each page. The answer in this question is that the problem is because of the "?" sign. It seems that "?" sign in the URL make it broken for the Facebook plugin. And I need to change form of URl writing.
Because my website is 7 years old have incoming links to it, I don’t want to change the method of the URl writing .
is there another way to fix it?
When inserting the widget to your page you add something similar to the following code:
You need to replace http://example.com each time for the new page, once with ?id=54 and another time with ?id=67 for each relevant page.
If you're using PHP this is the code which will request the URL of the current page and then link Facebook comments to it:
It works if your dynamic content has only one query string (for example ?product=). If it has more query strings for the same page, for example &sort= for sorting options, then it won't work properly as the Facebook comment which would appear on sorting option ascending wouldn't appear on the sorting option descending, for example.
You can solve this part by assigning a base URL for that product and then showing the FB comments for that URL on all dynamic pages with that product. For example, you're requesting FB comments for the page ?product=13&sort=asc&type=34 even if &sort and &type are different on that page.
Firstly, copy comment div and script from Facebook, paste it to your product details page:
and
Finally, simply add this code:
Hmm, I'm confused. You say the site is 7 years old and you cannot change it, but somehow you recently inserted the like plugin into an unchangeable web site. Now you want ways to fix this unchangeable website.
But, if you could change the website, here's what you're going to need to do:
<head>
section of each web page as described on the like plugin documentation web site. You can do this programmatically via the query string parameter using your .asp coding skills.EDIT
Take a look at what Facebook sees for your url
http://developers.facebook.com/tools/debug/og/echo?q=http%3A%2F%2Fwww.winebar.co.il%2Fproduct.asp%3Fproductid%3D567%26CatCode%3D182
Notice the plugin code
BAD:
data-href="http://winebar.co.il/product.asp?productid="
If should look like the URL in the user's browser bar:
GOOD:
data-href="http://www.winebar.co.il/product.asp?productid=567&CatCode=182"