I have this comment system: <div class="comment"> <fb:comments xid="THISISTHEID" numposts="10" width="734"></fb:comments> <div id="fb-root"></div> <script> window.fbAsyncInit = function() { FB.init({appId: 'THISISTHEID', status: true, cookie: true, xfbml: true}); }; (function() { var e = document.createElement('script'); e.async = true; e.src = document.location.protocol + '//connect.facebook.net/en_US/all.js'; document.getElementById('fb-root').appendChild(e); }()); </script> </div> And I'm basically including this on every tutorial page so that people can comment. Obviously, each page is unique and I want a different instance of comments. How can I make the ID's different for each page while using a PHP include? I would rather not go and post this on every page I have as it would take a while, and I'd like to be edit to edit easily in the future
set a variable with the id before including the file $my_id="THIS_IS_YOUR_ID"; Code (markup): then FB.init({appId: <?php echo $my_id; ?>, status: true, cookie: true, xfbml: true}); Code (markup):