【发布时间】:2014-09-19 13:22:19
【问题描述】:
我正在制作一个 facebook 应用程序,用于获取群组成员的链接用户(像这样:“https://www.facebook.com/app_scoped_user_id/536994703068744/”
但我的代码不起作用,出现错误“property length undefined”
这里是我的代码:
function getUserLink() {
FB.api('/243031772570397/members',{limit:5}, function(response) {
for(i=0;i<response.data.length; i++) {
var uid = response.data[i].id;
FB.api('/'+uid+'/', function(response2) {
for(y=0;y<response2.data.length; y++) {
console.log(response2.data[y].link);
}
});
}
});
}
【问题讨论】: