我已将facebook整合到一个网站中 . 我通过Facebook和一些社交插件实现了登录 . 每件事情都运转良好,但现在已经停止在网站的某个页面上工作了 . 在其他页面上它仍然有效 . 我在该页面中有一个登录按钮和注释框 . 但两者都不起作用 . 当我点击登录按钮没有弹出显示和评论框没有显示而不是Facebook无法找到页面显示 . 我使用了以下代码 . 首先,我与facebook异步连接
<div id="fb-root">
<script>
window.fbAsyncInit = function() {
FB.init({appId: "MY APP ID",
status: true,
cookie: true,
xfbml: true});
FB.getLoginStatus(function(response) {
if (response.session) {
HERE I am sending parameters to my system to login if user is login with facebook
} else {
}
});
FB.Event.subscribe("auth.login", function(response) {
window.location.reload();
});
FB.Event.subscribe("auth.logout", function(response) {
here i am sending parameter to my system to logout if user logout from facebook
});
};
(function() {
var e = document.createElement("script");
e.type = "text/javascript";
e.src = document.location.protocol +
"//connect.facebook.net/en_US/all.js";
e.async = true;
document.getElementById("fb-root").appendChild(e);
}());
我在评论框中使用了以下代码
<fb:comments xid="" url="" simple="1" css="http://www.mysite.com/css/comment.css?16" width="360" numposts="12"></fb:comments>
并使用
<fb:login-button perms='email' autologoutlink='true'></fb:login-button>
用于登录按钮其他页面上的相同代码正在运行 . 任何人都可以找出问题并指导我?提前致谢