title: Implementing and testing Facebook Social Plugins locally
body: <p>I'm new to Facebook development and would like to to add a comments plugin to my site.<br>
  I have created an app on Facebook in case it is needed. but since I have not registered my domain yet, I left the <code>App Domain</code> section empty.<br>
  Then I copied the code given to me at: <a href="http://developers.facebook.com/docs/reference/plugins/comments/" rel="nofollow noreferrer">http://developers.facebook.com/docs/reference/plugins/comments/</a> to test the plugin. But when I tested the code in an html file, nothing shows up.  </p>
  
  <ul>
  <li>Do I need an appid to use the comments plugin?  </li>
  <li>If I need the appid, should I first buy a domain and add it in the <code>App Domain</code> section? can I just test the plugin with <code>example.com</code> url? </li>
  <li>In general, what is the most basic way to get comments plugin to work?   </li>
  </ul>
  
  <p>UPDATE: 
  Based on Lix's answer, I have edited my hosts file and added:  </p>
  
  <pre><code>127.0.0.1 www.example.com
  127.0.0.1 example.com
  127.0.0.1 http://www.example.com
  127.0.0.1 http://example.com
  </code></pre>
  
  <p>Here's my test page:  </p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
    &lt;title&gt;My Web page&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;div id="fb-root"&gt;&lt;/div&gt;
      &lt;script&gt;(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";
          fjs.parentNode.insertBefore(js, fjs);
          }(document, 'script', 'facebook-jssdk'));&lt;/script&gt;
      &lt;div class="fb-comments" data-href="http://example.com" data-num-posts="2" data-width="470"&gt;&lt;/div&gt;
  &lt;/html&gt;  
  </code></pre>
  
  <p>But still no luck.</p>