代码jquery.ajax代码是在这里http://jsfiddle.net/assuredlonewolf/vHC9A/20/,在Firefox的工作,但未能在所有其他浏览器
我不知道是怎么回事!
我知道,被称为URL是没有问题的,我要确保我得到一个新的URL,当我在一个新的浏览器打开代码,因为它是一个新的会话和Facebook的访问令牌改变
代码jquery.ajax代码是在这里http://jsfiddle.net/assuredlonewolf/vHC9A/20/,在Firefox的工作,但未能在所有其他浏览器
我不知道是怎么回事!
我知道,被称为URL是没有问题的,我要确保我得到一个新的URL,当我在一个新的浏览器打开代码,因为它是一个新的会话和Facebook的访问令牌改变
在Firefox中也是它说
{ “错误”:{ “消息”:“错误验证访问令牌:会议已在UNIX时间1332122400.过期的当前Unix时间是1332123847.“, ‘类型’:‘OAuthException’, ‘代码’:190 }}
这可能是你的访问令牌的问题,但要谈关于你的功能
function createFriendsUi(elem)
它显示像通过IE和Chrome康寿在52号线无效字符一些事情说未捕获的SyntaxError:意外的标记非法
有非法空白字符,我不知道在哪里,但是当我回来的时候你的功能,它在铬,甚至在IE也工作得很好。后
你的函数重新编写
function createFriendsUi(elem)
{
var container = document.getElementById(elem);
for (i=0;i<fbUser.friends.allNamesAndIds.length; i++) {
var info = fbUser.friends.allNamesAndIds[i].split('||');
var div = document.createElement('div');
var image = document.createElement('img')
var name = document.createElement('p');
var label = document.createElement('label')
var input = document.createElement('input');
input.value = 'compare';
input.type = 'submit'
label.className = 'uiButton uiButtonConfirm';
name.innerHTML = info[0];
div.className = 'ppp';
image.src = ' http://graph.facebook.com/' + info[1] + '/picture ';
label.appendChild(input);
div.appendChild(name);
div.appendChild(image)
div.appendChild(label);
container.appendChild(div);
}
}
你能寄给我这个功能的改写吗 – 2012-03-19 02:32:52
我编辑过 – Prajwal 2012-03-19 02:37:14
谢谢你的帮助哥们 – 2012-03-19 02:39:52
您请求与已过期的令牌的网页和Facebook返回
{
"error": {
"message": "Error validating access token: Session has expired at unix time 1332122400. The current unix time is 1332123213.",
"type": "OAuthException",
"code": 190
}
}
尝试在Firefox中,看看会发生什么 – 2012-03-19 02:16:22
@JamesFair做到了,做的也一样。 – Luis 2012-03-19 02:34:37
你的访问令牌是不是在其他浏览器有效,您没有登录,在其他浏览器。 – 2012-03-19 02:05:31
不,我确定我得到正确的访问令牌 – 2012-03-19 02:06:42
访问您的网址时,它表示会话已过期。 “错误”:{ “消息”:“验证访问令牌的错误:会话在unix时间1332122400过期。当前unix时间为1332122905.”,“ ”type“:”OAuthException“, ”code“ 190 } }' – 2012-03-19 02:09:05