title: FB.api not working every time
body: <p>I am new to Facebook Javascript SDK. I am trying to create an application using this API. But has hard luck while usign the FB.api method. Somehow my FB.api method is not working properly each time. Sometimes it will give the response (I am just accessing response.name) while other time it will not invoked properly. </p>
  
  <pre><code>window.fbAsyncInit = function() {
  FB.init({
    appId      : 'my_app_id', // App ID
    status     : true, // check login status
    cookie     : true, // enable cookies to allow the server to access the session
    oauth      : true, // enable OAuth 2.0
    xfbml      : true  // parse XFBML
  });
  FB.getLoginStatus(function(response) {
    if (response.authResponse) {
     alert('user is:'+response.status); 
     userId = response.authResponse.userID;
     FB.api('/me',function(response) {
     alert('Inside FB.api function');
     document.getElementById("userInfo").innerHTML = 'Welcome &lt;img src="https://graph.facebook.com/'+ response.id + '/picture" style="margin-right:5px"/&gt;' +response.name + '!';
      });
      }
  });
  };
  </code></pre>
  
  <p>Other methods FB.ui and FB.getLoginStatus and Facebook like button is working as expected, but only FB.api is not working seamless manner as others. Do not why? Please help me to idenify the problem.</p>