我正在嘗試在我的網站上實現Facebook登錄功能。我按照說明操作,並且儘可能正確地輸入了代碼。這裏是我的代碼:Facebook在我的網站上登錄:「發生錯誤,請稍後再試。」
<div id="fb-root"></div>
<div class="fb-login-button" data-scope="email" >Login with Facebook</div>
<script>
window.fbAsyncInit = function() {
FB.init({
appId : 'MY_APP_ID',
status : true,
cookie : true,
xfbml : true,
oauth : true,
});
};
(function(d){
var js, id = 'facebook-jssdk'; if (d.getElementById(id)) {return;}
js = d.createElement('script'); js.id = id; js.async = true;
js.src = "//connect.facebook.net/en_US/all.js";
d.getElementsByTagName('head')[0].appendChild(js);
}(document));
如果你看到的東西我不知道,請告訴我。這應該工作據我所知(按照facebook的說明)後。
感謝您的幫助提前。
請更新腳本關閉。 – phwd 2012-02-08 06:59:06