在移动和桌面网站之间同步Facebook评论

I have 2 versions of my website Mobile and Desktop with Facebook Comment Plugin embedded in it. I want to sync every comment between the 2 websites having same address except for the subdomain like

https://www.example.com/contact-us.php
https://m.example.com/contact-us.php

I read about Comment Mirroring at Facebook Comments - Synchronization between website and fan page but I don't think this is what I want.

I want to enable my visitors to comment and see same comments on both these versions. Is it possible or not? I mean if someone comment on desktop version website then the comment should be visible on mobile version as well.

I have this code provided by Facebook when embedding Comment Plugin. Where do I have to change to support comment sync

 <div id="fb-root"></div>
 <script>(function(d, s, id) {
 var js, fjs = d.getElementsByTagName(s)[0];
 if (d.getElementById(id)) return;
 js = d.createElement(s); js.id = id;
 js.src = "//connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.6&appId=XXXXXXXXXXXXXXXX";
 fjs.parentNode.insertBefore(js, fjs);
 }(document, \'script\', \'facebook-jssdk\'));</script>

And this code on the page I want to show comment block

 <div class="fb-comments" data-href="https://www.example.com/contact-us.php" data-width="950" data-numposts="5"></div>

The comments made via the comments plugin are not tied to the page that you embed the plugin on, but to the URL you specify in the data-href parameter.

So if you want to have the same comments on the desktop and the mobile version of your site - specify one of those URLs as data-href for both versions.


Also, you should use the same og:url value for both versions; otherwise, like and share counts will get split over those two distinct URLs.