Search code examples
facebookpluginscommentsfacebook-comments

How can i group and display facebook comments done with FB comments plugin on different pages (same page in different languages)?


I use the Facebook comment plugin on my multilingual website. My website's URL contains website language and when someone comments on example.com/en/page.html it is not visible for user who is viewing the same page in French example.com/fr/page.html I want to display all comments done on the page in different languages (different URLs in this case). How can do that?.

This is the comment code as it is described here.

<div class="fb-comments" data-href="example.com/fr/page.html" data-num-posts="2" data-width="630"></div>

Solution

  • It's propably not a good idea, because users will comment in different languages and not understand each other.

    But if you really want that, just remove the country-code (/fr/ in the example) for all pages or just use the same one for alle pages (only in the comment-box) and you're good.

    Remember that facebook doesn't care whether the url is valid or not, it'll still save all the comments and display them as soon as you call the comment-box for this invalid site. Note that you might get an url-linter error though. So it's probably better just to use the same country-code in the url for all of them!