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