0
我的FB.login(它应该具有的功能范围结束:FBJS朋友生日的OAuth 2.0
}, {scope:'user_birthday,friends_birthday'});
在功能permissionsTest用户登录后()火灾:
function permissionsTest(){
FB.api('me/friends?fields=birthday', {fields:'birthday'}, function(response) {
alert(response.data[1]);
});
}
但是,所有的警报的回报是:[对象的对象]当我想看到的东西,如:1983年12月9日
如何把这个工作
?看到: graph.facebook.com/me/friends?fields=birthday
你可以清楚地看到,有一个名为“数据”持有对象的数组叫做“ID”和“生日”
对象我的先前的尝试:
response.data [1]返回[对象的对象]
响应返回[对象的对象]
response.data [1] .ID返回未定义
response.data [1] .birthday返回undefined
response.id return s undefined
response.birthday returns undefined
我看起来似乎没有把握,我觉得我已经用尽了文档,堆栈和谷歌。
我忘了提,[1]我与response.data努力的原因是因为第一个朋友“我的”ID的朋友的生日是空的。 –
刚刚测试过!你的明星! –