PHP , Facebook comments -
i have website located here www.sonnysgolfleague.com trying integrate facebook comments on it. site uses cutenews news articles. following code inserted index.php
<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/all.js#xfbml=1&appid=<ВАШ_appid>"; fjs.parentnode.insertbefore(js, fjs); }(document, 'script', 'facebook-jssdk')); </script>
then on add comment form cute news use following code
<div class="fb-comments" data-href="http://sonnysgolfleague.com/index.php?subaction=showcomments&id={news- id}&archive=&start_from=&ucat=1&" data-num-posts="2" data-width="470"></div>`
which works when leave comment on news story shows comment on every news story. believe because facebook needs unique identifier saving comments each article , accessing them. can me alter code have display comments on articles intended for?
thank you,
the actual source code of 1 of comment pages contains following attribute on plugin embedding code,
data-href="http://sonnysgolfleague.com/index.php?subaction=showcomments&id={news-id}&archive=&start_from=&ucat=1&"
– parameter news-id did not replaced actual value, , since every url same all embedded plugins.
(could’ve found out yourself, having actual page source code, right …?)
Comments
Post a Comment