facebook插件不能一起刷新
我的页面上有两个Facebook插件(喜欢和评论框)。 当我使用插件登录时,它不会自动登录另一个插件,直到我刷新页面 例如:当我点击like按钮登录时,我的评论框将保持注销状态,直到我刷新页面 请给我建议一些解决这个问题的好办法 我的代码如下facebook插件不能一起刷新,facebook,plugins,comments,refresh,Facebook,Plugins,Comments,Refresh,我的页面上有两个Facebook插件(喜欢和评论框)。 当我使用插件登录时,它不会自动登录另一个插件,直到我刷新页面 例如:当我点击like按钮登录时,我的评论框将保持注销状态,直到我刷新页面 请给我建议一些解决这个问题的好办法 我的代码如下 <script> window.fbAsyncInit = function () { FB.init({ appId: 'My app ID', status: true, cookie: true, xfbml: true }
<script>
window.fbAsyncInit = function () {
FB.init({ appId: 'My app ID', status: true, cookie: true, xfbml: true });
FB.Event.subscribe("xfbml.render", function (targetUrl) {
$("#myh1").html("Facebook Loaded");
//alert('edge.create');
setTimeout(aaa, 500);
});
FB.Canvas.setDoneLoading(function () {
alert("Done loading");
});
FB.Event.subscribe('comment.remove', function (response) {
alert('The status of the session is: ' + response.status);
});
};
(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);
} ());
function aaa() {
$("#content_1").mCustomScrollbar({
scrollButtons: {
enable: false
}
});
}
</script>
<div class="fb-like" data-send="false" data-href="http://www.facebook.com /AiLiveCaptions" data-width="298" data-show-faces="true">
</div>
<div class="fb-comments" data-href="http://www.facebook.com/AiLiveCaptions" data-num- posts="8" order_by="reverse_time" data-width="280"></div>
window.fbAsyninit=函数(){
init({appId:'My app ID',status:true,cookie:true,xfbml:true});
FB.Event.subscribe(“xfbml.render”),函数(targetUrl){
$(“#myh1”).html(“Facebook加载”);
//警报('edge.create');
设置超时(aaa,500);
});
FB.Canvas.setDoneLoading(函数(){
警报(“完成加载”);
});
FB.Event.subscribe('comment.remove',函数(响应){
警报('会话的状态为:'+response.status);
});
};
(功能(){
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);
} ());
函数aaa(){
$(“内容1”).mCustomScrollbar({
滚动按钮:{
启用:false
}
});
}
您可以使用
FB.XFBML.parse();
在文档中动态呈现XFBML标记
让它在最后自动刷新页面?我不想刷新整个页面