Как обновить / заменить встроенный комментарий Facebook в html?
Как обновить / заменить встроенный комментарий Facebook в html?
html>
<button onclick="replacePost();">replace</button>
<script src="//connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.3" async></script>
<div id="myDiv">
<div id="fb-root"></div>
<div class="fb-comment-embed"
data-href="https://www.facebook.com/AliWoldZayed/posts/2210874162339400?comment_id=659171634545617"
data-width="560" data-include-parent="false"></div>
</div>
<script>
function replacePost()
{
var newHTML = '<div id="fb-root"></div><div class="fb-comment-embed" data-href="https://www.facebook.com/AliWoldZayed/posts/2210874162339400?comment_id=604100436764267" data-width="560" data-include-parent="false"></div>';
$("#myDiv").html(newHTML);
FB.XFBML.parse() //<---- how???
}
</script>
Как обновить / заменить встроенный комментарий Facebook в html?