JavaScript does not execute as expected - Facebook JavaScript SDK
<p>That is the body of a mvc 3 view that i have. It's about a Facebook app that i want to create. The expected result is to have a pop-up window showing the name of the user entered the app. When i run the app nothing happens so no code is executed. So what is the mistake on this?</p>

<pre><code>&lt;body&gt;
&lt;div id="fb-root" style="display: none"&gt;&lt;/div&gt;
&lt;script&gt;
    window.fbAsyncInit = function () {
        FB.init({
            appId: 'My app ID', // Application ID provided by Facebook
            status: true, // Check login status
            cookie: true, // Enable cookies to allow the server access the session
            xfbml: true // parse XFBML
        });

        // Other initialization code here
        FB.api('/me', function (response) {
            alert('Your name is ' + response.name);
        });
    };

    // Load Facebook JavaScript SDK asynchronously
    (function (d) {
        var js, id = 'facebook-jssdk', ref = d.getElementByTagName('script')[0];

        if (d.getElementById(id)) {
            return;
        }

        js = d.createElement('script');
        js.id = id;
        js.async = true;
        js.src = "//connect.facebook.net/en_US/all.js";
        ref.parentNode.insertBefore(js, ref);
    }(document));
&lt;/script&gt;
@RenderBody()
</code></pre>

<p></p>
