How to get facebook user info using fb:login-button
<p>I'm trying to implement facebook connect in website, and have a problem to access the facebook user info, i'm using FB.api to see info but throw "undefined" in my alert.</p>

<p>My code is here:</p>

<pre><code>&lt;div id="fb-root"&gt;&lt;/div&gt;
&lt;script&gt;
        window.fbAsyncInit = function() {
          FB.init({
            appId      : 'MYAPPID',
            status     : true, 
            cookie     : true,
            oauth      : true,
            xfbml      : true
          });


            FB.Event.subscribe('auth.login', function() 
            {
                window.location = "URL_REGISTRATION";
            });



            FB.getLoginStatus(function(response) {
             if (response.status == 'connected') {
                document.getElementById('fb-root').innerHTML = '&lt;a href="http://URL_REGISTRATION"&gt;&lt;img src="/img/fb-login.png"&gt;&lt;/a&gt;';
             } else {
                document.getElementById('fb-root').innerHTML = '&lt;fb:login-button  scope="read_stream,publish_stream,email,user_about_me,user_birthday,friends_birthday,friends_location" size="large"&gt;&lt;/fb:login-button&gt;';
                FB.XFBML.parse(document.getElementById('fb-root'));
             }
           });

           FB.api('/me',function(response) {
             alert(response.email);
            });

        };

            // Load the SDK Asynchronously
          (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));


      &lt;/script&gt;
</code></pre>

<p>Can someone tell me how to access user info using fb:login-button and fb:api?....or  another way to do that.</p>

<p>Thanks in advance.</p>
