Hello everybody this really is my problem: the Facebook designers site states that, to be able to initialize p Javascript SDK: "Where to place this code is appropriate following the opening <body> tag."

Within the Header.php of my Wordpress-based blog, i've this code:

</head>

<body <?php body_class(); ?>>

  <div id="fb-root"></div>
  <script>
    window.fbAsyncInit = function() {
      FB.init({
        appId      : XXXXXXXXXXXXXXX,
        status     : true, 
        cookie     : 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>

<div id="pagewrap1">

        <div id="headerbg">

            <div id="header">
            <?php include (ABSPATH.'wp-content/flashfader/flashfaderhtml.txt'); ?> 

            </div>                

        </div><!-- headerbg END -->

</div><!-- ENDof #pagewrap1 -->    

<div id="pagewrap2"> 

<div id="access" role="navigation">

            <?php wp_nav_menu( array( 'container_class' => 'menu-header', 'theme_location' => 'primary' ) ); ?>

<div id="iconfacebook">
<a href="http://www.facebook.com/name" title="Facebook"><img src="png"; /> </a>
</div>    
<div id="icontwt">
<a href="http://twitter.com/name" title="Sígueme"><img src="png" /></a>
</div>    
<div id="iconfeed">
<a href="feed" title="Suscribirse RSS 2.0"><img src="png" /></a>
</div>

    <div class="search-form">
            <?php $search_text = "Buscar..."; ?>
                <form method="get" id="searchform" action="<?php bloginfo('home'); ?>/">

                <fieldset class="search">

                <input type="text" value="<?php echo $search_text; ?>" name="s" id="s" onblur="if (this.value == '') {this.value = '<?php echo $search_text; ?>';}" onfocus="if (this.value == '<?php echo $search_text; ?>') {this.value = '';}" />

<button class="btn" title="Buscar">Search</button>    

                </fieldset>
</form>     

</div>

</div><!-- #access -->

</div><!-- ENDof #pagewrap2 -->    

<div id="pagewrap3">

And that is where my header.php finishes.

Issue is: the registration connect a devoted Wordpress page does not work, and shows this image.

But when I put the code inside a text widget around the sidebar it really works, as with this other image. You may also begin to see the sidebar margin.

What shall we be held doing wrong using the Javascript SDK? Where must i put it? I want the registration form inside a devoted page. Help.

Put the <div id="fb-root" /> tag in which you want Facebook content to look.

Put the <script> tag at the end of page, immediately prior to the closing </body> tag.