在执行这段代码后,我遇到了以下错误:
<div id="fb-root"></div>
<script src="http://connect.facebook.net/en_US/all.js"></script>
<script>
FB.init({
appId : 'realIdInTheCode',
status : true, // check login status
cookie : true, // enable cookies to allow the server to access the session
xfbml : true // parse XFBML
});
</script>
<div id="fb-root"></div><script src="http://connect.facebook.net/en_US/all.js#appId=realIdInTheCode&xfbml=1">
</script><fb:login-button show-faces="false" width="200" max-rows="1"></fb:login-button>
我认为问题出在在调用login()函数之前没有调用init()函数。
但是我仍然遇到了这个错误:Error: 在调用FB.init()之前调用了FB.login()。
此时我有点困惑,所以真的很感激您的帮助 :)