I use this Facebook Login Button code:
<div id="fb-root"></div>
<script src="http://connect.facebook.net/en_US/all.js"></script>
<script>
FB.init({
appId : 'myActualId',
status : true, // check login status
cookie : true, // enable cookies to allow the server to access the session
xfbml : true // parse XFBML
});
</script>
<fb:login-button show-faces="false" width="200" max-rows="1"></fb:login-button>
But the debug console gives me this error: FB.login() called before calling FB.init().
I made a test page so my error can be seen: http://www.comehike.com/test_fb_connect.php
I have no idea what I am doing wrong. Any help would be much appreciated!
Thanks, Alex
If you pass the non existing FB app key to init() then only you get the error of 'FB.login() called before calling FB.init()'
Make sure, you hadn't been doing the same.
You're loading the Facebook script all.js twice. It should be loaded only once.
Seeing as no one on the interwebs was able to answer my question, I wiped out the old Facebook app entirely (on my developers.facebook.com account) and just made a new app from scratch and made a totally new one.
After that, the basic code did the job
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With