XD_Proxy弹出窗口不会关闭 [英] XD_Proxy popup won't close
问题描述
为了清晰起见,我的脚本(被删除):
FB.login(function(response){
alert(response.authResponse);
},{scope:'email,user_birthday,publish_stream'});
该脚本运行(它提醒响应),但仍然弹出窗口不会关闭。是因为最近的Facebook更新吗?虽然昨天这样做有点奇怪,但现在不行。更不用说我的朋友的项目,也使用JS SDK似乎工作正常。
我尝试使用其他应用程序ID,使用channelURL等,但仍然没有运气。最后的办法是使用PHP SDK与window.open()弹出,但我仍然喜欢JS解决方案,如果有的话。
感谢您的答案
显然,我的朋友添加了另一行,我不知道为什么,所以我只是评论不必要的行,使其工作。 >
window.fbAsyncInit = function(){
FB.init({appId:'<?php echo $ this-> ; config-> item(facebook_app_id);?>',status:true,cookie:true,xfbml:true,oauth:true});
//FB.UIServer.setLoadedNode = function(a,b){FB.UIServer._loadedNodes [a.id] = b; }
};
几天前,它工作得很好,所以我猜Facebook已经在后台更新了。 / p>
This is really annoying. I'm using JS SDK to connect to Facebook. And yesterday I tried everything and everything worked fine. But this morning, when I clicked the login button, after I logged in to Facebook, this popup showed up and wouldn't close by itself.
My script is (stripped down for clarity) :
FB.login(function(response) {
alert(response.authResponse);
}, {scope: 'email,user_birthday,publish_stream'});
The script runs (it alerts the response), but still the popup won't close. Is it because of recent Facebook updates? Though it's kinda weird that yesterday it worked and now it doesn't. Not to mention my friend's project that also uses JS SDK seems to work fine.
I've tried using other app id, using channelURL, etc but still no luck. Last resort would be using PHP SDK with window.open() for popup, but I still prefer JS solution if any.
Thanks for the answers
Apparently, my friend added another line which I don't know what for, so I simply comment the unnecessary line to make it work.
window.fbAsyncInit = function() {
FB.init({appId: '<?php echo $this->config->item("facebook_app_id");?>', status: true, cookie: true, xfbml: true, oauth: true});
//FB.UIServer.setLoadedNode = function (a, b){FB.UIServer._loadedNodes[a.id] = b; }
};
A couple days ago it worked fine though, so I guess Facebook has been updating in the background.
这篇关于XD_Proxy弹出窗口不会关闭的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!