我想检查用户是否使用Facebook JavaScript JDK和jQuery登录facebook.但即使超时10秒,我收到此错误消息:
在调用FB.init()之前调用FB.getLoginStatus().
这是我的代码:
<script type="text/javascript" src="/js/jquery-1.2.3.pack.js" />
<div id="fb-root"></div>
<script src="http://connect.facebook.net/de_DE/all.js"> </script>
<script type="text/javascript">
jQuery('document').ready(
function(){
FB.init({
status : true,
cookie : true,
xfbml : true
});
setTimeout(function(){
FB.getLoginStatus(function(response) {
if (response.session) {
jQuery('div#likeButtonWhatsThisText').remove();
}
});
}, 10000)
}
)
</script>
Run Code Online (Sandbox Code Playgroud)
有关如何使这项工作的任何想法?
谢谢基督徒