我正在尝试让 facebook 连接的东西在我的本地主机上工作。在 FireFox 和 Chrome 中它可以完美运行。在 Internet Explorer 中:
连接对话框中出现错误。这是:
无效参数 Facebook Connect 跨域接收方 URL ( http://static.ak.fbcdn.net/connect/xd_proxy.php#?=&cb=f1e33405f2824e9&origin=http%3A%2F%2Flocalhost%2Ff78888c44d2c37&relation=opener&transport=flash&frame=f144cb110fc0cc&result =xxRESULTTOKENxx ) 必须以应用程序的连接 URL ( http://localhost:8080/ ) 作为前缀。您可以在应用程序设置编辑器中配置连接 URL。
当身份验证成功时,Internet Explorer 在弹出窗口中重定向到本地主机上的一个页面,即我的 facebook 连接 URL。对于 Chrome 和 Firefox,它会关闭弹出窗口并允许处理程序重新加载页面。
这非常令人沮丧,因为 Chrome 和 Firefox 中的行为是完美的。请你能提供一些建议 - 我真的坚持这一点。我的 HTML 代码如下:
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:fb="http://www.facebook.com/2008/fbml"
xml:lang="en" lang="en">
<fb:login-button></fb:login-button>
<div id="fb-root"></div>
<script src="http://connect.facebook.net/en_US/all.js"></script>
<script>
FB.init({appId: 'MY_APP_ID', status: true, cookie: true,xfbml: true});
FB.Event.subscribe('auth.login', function(response) {
window.location.reload();
});
</script>
Thank you.