URL with query params considered separate page by FB
-
Hi,
I’m using version 2.3.6 of the FB comments plugin.I noticed that on pages that have FB comments, I can only see comments left on the page with the exact same URL, including the tracking pixel, which is obviously different from user to user.
I tracked the problem to the data-href attribute that was empty.
This happens on the class-frontend.php file. The data-href attribute on <div class=”fb-comments> in the HTML5 version, as well as the href attribute on the <fb:comments> tag on the FBML version, both use get_permalinks() without any arguments.I had to make two alterations to make this work:
1. I replaced all get_permalinks() calls with get_permalinks(get_the_ID())
2. I replaced all references to the $url variable, which was always empty for some reason, with a call to get_permalinks(get_the_ID()).I’m not a PHP or a WP guy, so there might be some more wordpressy way of doing this, but I thought I’d share my solution in case this helps anyone or might be useful for fixing the underlying issue in the next plugin version.
This might be of value to anyone who’s having problems with comments not always appearing on their pages.
S.A
- The topic ‘URL with query params considered separate page by FB’ is closed to new replies.