FaceBook登录按钮错误:调用FB.init()前调用FB.login() [英] FaceBook Login Button Error: FB.login() called before calling FB.init()
本文介绍了FaceBook登录按钮错误:调用FB.init()前调用FB.login()的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
< div id =fb-root>< ; / DIV>
< script src =http://connect.facebook.net/en_US/all.js>< / script>
< script>
FB.init({
appId:'realIdInTheCode',
status:true,//检查登录状态
cookie:true,//启用Cookie以允许服务器访问会话
xfbml:true //解析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 =falsewidth =200max-rows =1>< / fb:login-button>
我的想法是在login()之前调用init()
但是我仍然收到该错误:错误:FB.init()之前调用FB.login()。
我在在这一点上总是有些混乱,所以我真的很感激帮助:)
解决方案
对我来说,对应用程序本身有一些问题。所以我删除了FB中的旧应用程序,并创建了一个新的应用程序,并且事情刚刚开始工作。
I am getting this error after doing this code:
<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>
Which to my thinking is calling the init() before the login()
But I still get that error: Error: FB.login() called before calling FB.init().
I am in kind of total confusion at this point, so I'd really appreciate the help :)
解决方案
For me, it turned out to be some problem with the app itself. So I deleted the old app in FB and made a new one, and things just started to work.
这篇关于FaceBook登录按钮错误:调用FB.init()前调用FB.login()的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文