我正试图对博爱基金会的评论发表看法。
var url = http://graph.facebook.com/comments?id={{ url_of_the_page }}
我在利用j Query,试图从答复中获取data.id
和其他物品:
$j.getJSON(url, function (item) {
console.log(item);
});
However, they stick an URL object at the top, so it s:
item
{{ url_of_the_page }}
data
[0]
id
...
我如何使用<条码>id和其他特性? item.{ url_of_the_page >,data
没有工作。
JSON样本:
{
"http://www.mysiteurl.com": {
"data": [
{
"id": "10150212811760417_27834638",
"from": {
"name": "Tomas Tomas",
"id": "100000606151004"
},
"message": "test",
"created_time": "2011-11-22T14:21:42+0000"
},
{
"id": "10150212811760417_27835460",
"from": {
"name": "Tomas Tomas",
"id": "100000606151004"
},
"message": "ThanksGiving!",
"created_time": "2011-11-22T14:51:23+0000"
},
{
"id": "10150212811760417_27835931",
"from": {
"name": "Tomas Tomass",
"id": "100000606151004"
},
"message": "3rd comment",
"created_time": "2011-11-22T15:08:49+0000"
}
],
"paging": {
"next": "https://graph.facebook.com/comments?ids=httpu00253Au00252Fu00252Fwww.mywebsite.com&limit=25&offset=25"
}
}
}