How to transfer Facebook comments using the URL property to HREF

I would be very grateful for any contribution that anyone has in the problem that I encounter with the Facebook Comments plugin system.

Essentially, we created the Wordpress theme, which was launched last year, and used the old FMBL legacy to integrate facebook comments. The code for comments was something like this:

<div id="fb-root" style="padding-top:8px;"> </div> <script src="http://connect.facebook.net/en_US/all.js#appId=<?php echo $facebookappid; ?>&amp;xfbml=1"></script> <fb:comments URL="<?php the_permalink() ?>" xid="<?php echo $post->ID; ?>" publish_feed="true" migrated="1" reverse="false" numposts="20" width="620"> </fb:comments> 

Now the problem is that we get errors on some of our sites by saying the following:

-

Warning: this comment plugin works in compatibility mode, but there are no posts yet. Consider specifying an explicit "href" as suggested in the comment plugin documentation to take full advantage of the plugin's features.

-

I tried to change the URL value for HREF, which fixes the problem, but also removes all previous comments on the site. It seems that with the old system they were not efficiently posted to Facebook.

Does anyone know how we could transfer comments from the old to the new system (in this case, the migration function does not work).

+5
source share
4 answers

There lies a lie. Facebook provided a migration function when moving from the first incarnation of the comment plugin to the second, and now it is completely excluded in the third. However, the problem is that comments made when using the "migrate = 1" option in the second version are lost when switching to the new version (to get rid of the warning).

Integration into blogs / cms, etc. Now it loses comments if they did not switch to href rag in the second incarnation, which was not much, because they did not want to lose the original comments from the fist round of using the plugin.

Does anyone have a working request to output comments via XID from old code? At the very least, we can include it as an add-on under the new comment plugin to add old comments below.

Edit: Therefore, I recall when the first plugin appeared, the forums that Gil made had a comment manager tool. Forums are still available (mostly), so I looked through them and he deleted it. I remember that there was a way that he pulled all your sentences through XID in a loop, if I recall.

I'm going to try to dig out / make fun of a remake of this where we can at least pull something for comments so that we can reference them. I think it all depends on how the XID was saved. I remember saving my href (before href was an option) as XID, because I knew that it was unique. However, now when I try to search using the comment.get testing tool, it gives an error in the XID formatting, so I'm afraid that they may actually have crushed / cleared it of the old http: // data.

Disappoint, if not more, but not the only time that something has changed without warning or any real thinking process.

+5
source

There are no workarounds yet. You have 2 options: if you add new href or old xid parameters with migrated = 1, you will lose all previous comments and you will remove the error. Or you’ll be left with your old version commentary, with thousands of old comments and a yellow error field below ... Welcome to the guys from the world of Facebook ... in 6 months they can fix it ... nothing of the third party can do here ...: (

+1
source

The problem has not yet been fixed, but some progress has been made, see this topic: How to remove the warning about comments on facebook?

0
source

You will need to change it to the new html format, see the Social plugins page for generating HTML code for the Comment block . It looks something like this:

 <div class="fb-comments" data-href="http://example.com" data-num-posts="2" data-width="500"> </div> 

Comments on models may not be displayed, perhaps data-href is different from the old one, try to compare the old value as close as possible, and you will see that the comments are returned.

-2
source

Source: https://habr.com/ru/post/950366/


All Articles