Reputation: 1297
Just want to change the property data-href from the node of facebook comment.
Facebook's javascript code:
<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 = 'https://connect.facebook.net/pt_BR/sdk.js#xfbml=1&version=v2.11&appId=YOURAPPID';
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
</script>
Facebook's node:
<div class="fb-comments" id="facebookComment" data-href="" data-width="100%" data-numposts="5"></div>
Upvotes: 1
Views: 602
Reputation: 95
This code might works:
document.getElementById("facebookComment").setAttribute("data-href",window.location.href );
Upvotes: 1