我有下面的代碼正確的我的應用程序Facebook的JS積分誤差
<div id="fb-root"></div>
<script type="text/javascript">
window.fbAsyncInit = function() {
FB.init({appId: '136904373......', status: true, cookie: true,
xfbml: true});
};
(function() {
var e = document.createElement('script'); e.async = true;
e.src = document.location.protocol +
'//connect.facebook.net/en_US/all.js';
document.getElementById('fb-root').appendChild(e);
}());
FB.getLoginStatus(function(response) {
if (response.session) {
alert('Logged In');
} else {
alert('Not Logged In');
}
});
</script>
目前,我發現了以下錯誤的body標籤下面的「FB不是FB.getLoginStatus(函數(響應),這使得定義我相信,FB.init沒有被正確加載。任何人有任何想法(我模糊的目的我的應用程序想法的最後6位數字)
感謝
刪除了錯誤,但現在FB.getLoginStatus不起作用,並且沒有任何警報正在觸發。 – Phil 2010-09-19 20:57:41
@phil - 你有沒有試過在firefox/firebug中查看它是怎麼回事? – tvanfosson 2010-09-19 21:46:20