Facebook Integration to Content Management System
Facebook comment integration is not as hard as you need to create an Facebook application and obtainb the unique applicatin id and xid. All you need to do is, paste the codes below according to your need. It can be integrated into CMS or just normal website
1. For WordPress CMS (Add the following line of codes in singe post – not recommended to be used with other Facebook plugins within one page)
<div id=”fb-root”></div><script src=”http://connect.facebook.net/en_US/all.js#xfbml=1″></script><fb:comments href=”<?php echo the_permalink() ?>” num_posts=”5″ width=”640″></fb:comments>
2. For normal website (Add the following line of codes to a .php file and use require_once function to call it – eliminates the need to paste the code repetitively to all web pages | Change “adriancjy.com” to your desire website URL)
<div id=”fb-root”></div><script src=”http://connect.facebook.net/en_US/all.js#xfbml=1″></script><fb:comments href=”http://www.adriancjy.com/<?=$_SERVER[‘REQUEST_URI’]?>” num_posts=”5″ width=”640″></fb:comments>
3. Add the following to <head> section (To allow moderation via Facebook – depending on user settings, change “adriancjy” to your own Facebook username | Go to https://developers.facebook.com/tools/comments?id=248464823114&view=recent_comments)
<meta property=”fb:admins” content=”adriancjy”/>