过去几周我一直在开发 Facebook 应用程序。我已成功将数据发布到 Facebook 的 Graph API,但我一直在努力找回特定字段。我正在使用 API Explorer 来测试我的各种 GET 尝试。以下是 api 调用返回的数据的摘录:me/g_music:listen_to?fields=data
{
"data": [
{
"data": {
"song": {
"id": "355308601243965",
"url": "https://g8-music.herokuapp.com/object/song.php?title=Pierce+The+Veil+-+Bulls+in+the+Bronx&description=Played+On+G8-Music+for+Windows+8.&image=http%3A%2F%2Fuserserve-ak.last.fm%2Fserve%2F174s%2F78366946.jpg",
"type": "g_music:song",
"title": "Pierce The Veil - Bulls in the Bronx"
}
},
"id": "245964195537372"
},
{
"data": {
"song": {
"id": "365613963536278",
"url": "https://g8-music.herokuapp.com/object/song.php?title=Pierce+The+Veil+-+Kings+for+a+Day+%28feat.+Kellin+Quinn%29&description=Played+On+G8-Music+for+Windows+8.&image=http%3A%2F%2Fuserserve-ak.last.fm%2Fserve%2F174s%2F78366946.jpg",
"type": "g_music:song",
"title": "Pierce The Veil - Kings for a Day (feat. Kellin Quinn)"
}
},
"id": "245961632204295"
},
我试图获得 title 的价值,但到目前为止还没有成功。
如果我尝试类似:me/g_music:listen_to?fields=data.data... 我收到一个异常,告诉我“数据不支持子字段”。
我对图形 API 比较陌生,所以我很可能遗漏了一些明显的东西。