title: How do you handle errors for Facebook SDK functions like FB.getLoginStatus()?
body: <p>Under certain circumstances, using functions like <code>FB.getLoginStatus()</code> will cause console errors such as:</p>
  
  <blockquote>
    <p>Given URL is not allowed by the Application configuration.: One or more of the given...</p>
  </blockquote>
  
  <p>The problem is that if an error like this occurs, the callback to the function never gets called. Is there any way to handle errors of this kind? <code>try/catch</code> doesn't work, and the function doesn't return anything directly. I also want to avoid a timeout hack if possible.</p>
  
  <p>There is nothing in the docs explaining how to deal with errors of this kind either: 
  <a href="https://developers.facebook.com/docs/reference/javascript/FB.getLoginStatus" rel="nofollow">https://developers.facebook.com/docs/reference/javascript/FB.getLoginStatus</a></p>
  
  <p><strong>Note: I am not trying to solve the error above, I am trying to figure out to handle it</strong></p>