XD_Proxy弹出窗口不会关闭 [英] XD_Proxy popup won't close

查看:134
本文介绍了XD_Proxy弹出窗口不会关闭的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这真的很讨厌。我正在使用JS SDK连接到Facebook。而昨天我试过一切,一切都很好。但是今天早上,当我点击登录按钮后,当我登录到Facebook后,这个弹出窗口就显示出来,不会自动关闭。



https://s-static.ak.fbcdn.net/connect/xd_proxy.php?版本= 3#CB = f14545c19c&安培;来源= HTTP%3A%2F%2Flocalhost%2Ff4dcd5fdc&安培;关系=开瓶器&安培;运输= PostMessage的&安培;帧= f7e77d918&安培;的access_token = ...&安培; expires_in = 6642&安培; signed_request = ...&安培; base_domain = localhost



为了清晰起见,我的脚本(被删除):

  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.

https://s-static.ak.fbcdn.net/connect/xd_proxy.php?version=3#cb=f14545c19c&origin=http%3A%2F%2Flocalhost%2Ff4dcd5fdc&relation=opener&transport=postmessage&frame=f7e77d918&access_token=...&expires_in=6642&signed_request=...&base_domain=localhost

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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆