Uncaught ReferenceError: checkLoginState is not defined using facebook API
<p>I keep trying to fix this code but I am stuck with this error on my console:</p>

<blockquote>
  <p>Uncaught ReferenceError: checkLoginState is not defined.</p>
</blockquote>

<p>I simply followed <a href="https://developers.facebook.com/docs/facebook-login/web" rel="noreferrer">this guide</a>. Here is my code for this function and when I call it:</p>

<pre><code>function checkLoginState() {
  FB.getLoginStatus(function(response) {
    statusChangeCallback(response);
  });
}


&lt;fb:login-button data-max-rows="1" data-size="large" data-show-faces="false" data-auto-logout-link="true" onlogin="checkLoginState();" scope="public_profile, pages_show_list"&gt;&lt;/fb:login-button&gt;
</code></pre>