Facebook Graph API音乐决定艺术家和专辑

时间:2015-09-14 08:49:25

标签: android facebook facebook-graph-api

如何区分Facebooks Graph API中的艺术家和专辑? 搜索时

new GraphRequest(
        AccessToken.getCurrentAccessToken(),
        "/me/music",
        null,
        HttpMethod.GET,
        new GraphRequest.Callback() {
            @Override
            public void onCompleted(GraphResponse graphResponse) {
                response = graphResponse;
            }
        }
)

返回专辑和艺术家。 (好奇的歌曲不是) 我如何判断它是专辑还是艺术家?

GraphResponse看起来像这样

{
"data": [
    {
        "name": "The Marshall Mathers LP",
        "id": "112321302117017",
        "created_time": "2015-09-14T08:15:22+0000"
    },
    {
        "name": "Sabaton",
        "id": "7545529867",
        "created_time": "2015-08-14T11:43:03+0000"
    }
],
"paging": {
    "cursors": {
        "before": "MTEyMzIxMzAyMTE3MDE3",
        "after": "NzIzNDU0NjcwNgZDZD"
    }
}

如何判断它是专辑还是艺术家?

0 个答案:

没有答案