0
사용자 정의 그래프 개체 및 작업이 포함 된 Facebook 앱이 있습니다.FaceBook Graph API 쿼리에서 반환 한 JSON의 문자가 잘못되었습니다.
나는 다음과 같은 유효한 쿼리 그래프 API Explorer를 조회 할 수 있습니다...
나/친구는 필드 = ID, 이름은 junk_pile는?
'junk_pile은'내 사용자 정의 개체이며'추가 '는 사용자 정의 작업입니다.
이 쿼리는 자바 스크립트에서 처리 할 수없는 다음 json 문자열을 반환합니다.
{
"data": [
{
"id": "100004540740651",
"name": "bob test",
"junk_pile:add": {
"data": [
{
"id": "103336283161063",
"from": {
"name": "bob test",
"id": "100004540740651"
},
"start_time": "2012-10-18T21:03:48+0000",
"end_time": "2012-10-18T21:03:48+0000",
"publish_time": "2012-10-18T21:03:48+0000",
"application": {
"name": "JunkPile",
"namespace": "junk_pile",
"id": "421664961221046"
},
"data": {
"junk": {
"id": "438865462826198",
"url": "http://www.orghubapp.com/jp/Default.cshtml?jid=14",
"type": "junk_pile:junk",
"title": "Penquins"
}
},
"type": "junk_pile:add",
"no_feed_story": false,
"likes": {
"count": 0,
"can_like": true,
"user_likes": false
},
"comments": {
"count": 0,
"can_comment": true
}
}
],
"paging": {
"next": "https://graph.facebook.com/100004540740651/junk_pile:add?limit=25&offset=25"
}
}
}
],
"paging": {
"next": "https://graph.facebook.com/100004522508350/friends?fields=id,name,junk_pile:add&limit=5000&offset=5000"
}
}
문제는 하나의 필드 식별자 "junk_pile : add"입니다.
json 필드를 ':'문자로 처리하는 방법을 알아낼 수 없습니다.
예를 들어:
$.each(data, function (i, j) {
var id = j.id; // fine
var jp = j.junk_pile:add; // will not allow : char!
});
내가 시도 평가()하지만,이를 알아낼 수 없습니다.
TIA, 샘