try this
<script type="text/javascript">
window.fbAsyncInit = function() {
FB.init({
appId : 'YOUR_APP_ID_HERE',
channelUrl : 'http://localhost.com/channel.html',
status : true,
cookie : true,
oauth : true,
xfbml : true
});
};
(function(d){
var js, id = 'facebook-jssdk'; if (d.getElementById(id)) {return;}
js = d.createElement('script'); js.id = id; js.async = true;
js.src = "//connect.facebook.net/en_US/all.js";
d.getElementsByTagName('head')[0].appendChild(js);
}(document));
</script>
<h1>Registration</h1>
<div style="float: left; margin-right: 15px;">
<div class="fb-registration">
data-fields='[{"name":"name"},
{"name":"birthday"},
{"name":"location"}, //this retrieves the location of the user
{"name":"gender"},
{"name":"email"},
{"name":"username","description":"Username","type":"text"},
{"name":"password"}]'
data-redirect-uri="http://localhost.com/register.php">
</div></div>