首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >fb邀请不在ie 8中工作的朋友

fb邀请不在ie 8中工作的朋友
EN

Stack Overflow用户
提问于 2013-01-29 12:51:13
回答 1查看 274关注 0票数 0

我使用FB API邀请朋友,让用户邀请他们的朋友到我的应用程序。所有的工作在Chrome和FF,但不是在IE 8。当我点击它,在IE的底部,将显示“错误页面”。错误将指向connect.facebook.net部件。下面是代码;

代码语言:javascript
运行
复制
<link rel="stylesheet" type="text/css" href="css/style.css">
</head>
<script type="text/javascript" src="js/jquery-1.8.3.min.js"></script>
<script src="https://connect.facebook.net/en_US/all.js"></script>

<script>
FB.init({
appId:'xxxxxxxxxxxxxx',
cookie:true,
status:true,
xfbml:true
});

function FacebookInviteFriends()
{
FB.ui({
method: 'apprequests',
message: 'Come Upload Your Own Photo For A Chance To WIN!',
  }, requestCallback);
}

function requestCallback(response)
{
if(response && response.request) {
     // Here, requests have been sent, facebook gives you the request and the array of     recipients
     //console.log(response);

     location.href='final.php';

} else {
alert("You need to invite friends in order to proceed");
     // No requests sent, you can do what you want 
}
}
</script>
EN

回答 1

Stack Overflow用户

发布于 2013-01-29 12:59:06

尝试在FB.init中添加域参数,它在ie8中有效

fb init将如下所示:

代码语言:javascript
运行
复制
FB.init({
appId:'xxxxxxxxxxxxxx',
domain:'yourdomain.com',
cookie:true,
status:true,
xfbml:true
});
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/14575854

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档