[Custom Page] FB Comments

cajkan

Active Member
Hello

i was wondering how to add Facebook comments into custom page

Any Guide will be great

Thank you
 

leonor

Active Member
License Active
idk on my side i installed the FB Plugin.
Then go into Admin Control Panel --> Settings --> Change Setting --> Facebook Settings
There is "Facebook comments on stats pages" Change it from no to yes and Click "Change Settings"
 

cajkan

Active Member
No No
i mean add thouse comments on custom page
Lets say i got some info about any news and users comment below
 

cajkan

Active Member
Ive tryed to use this too

HTML:
<div id="social_block">
  {$stats_social_pages}
</div>
But doesnt work.
 

Basti

Administrator
Staff member
What you are doing there wont work,
that is not comments but the share buttons

try to paste this into your page
Code:
<div id="fb-root"></div>
<script type="text/javascript">(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=YOUR_APP_ID";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
 
<br />
<div class="fb-comments" data-href="PAGE_URL" data-num-posts="5" data-width="300" data-colorscheme="light"></div>
Within this code replace " YOUR_APP_ID" with your application id, you need one. If you dont have one, read the favebook guide in the tutorials section, there i explained on how to create a application
And within the div replace "PAGE_URL" with the full url of your custom page
data-num-posts="5" is number of visible comments
data-width="300" is commentbox width
data-colorscheme="light" the colorsheme of the box, light or dark
 
Top