0

我通过 Facebook 图形 API 以 JSON 格式获取以下数据。但是,它看起来像是无效的 JSON 格式。JSON 格式化程序说错误在第 1 行。这个错误是什么?

{
    data =     (
                {
            application =             {
                id = 2409997254;
                name = Likes;
            };
            "created_time" = "2013-05-05T07:51:41+0000";
            from =             {
                id = 100000347121257;
                name = "Rishab Gulati";
            };
            id = "notif_746853089_182660043";
            link = "http://www.facebook.com/photo.php?fbid=10151457234013090&set=a.427064503089.223857.746853089&type=1";
            object = "<null>";
            title = "Rishab Gulati, Deepika Gurnani and 2 other people like your photo.";
            to =             {
                id = 746853089;
                name = "Ashish Agarwal";
            };
            unread = 1;
            "updated_time" = "2013-05-05T10:48:33+0000";
        }
    );
    paging =     {
        next = "https://graph.facebook.com/746853089/notifications?format=json&access_token=**xxxxxxxxxx";
        previous = "https://graph.facebook.com/746853089/notifications?format=json&access_token=**SNIP**&limit=5000&since=1367740301&__paging_token=notif_746853089_182660043&__previous=1";
    };
    summary =     {
        "unseen_count" = 1;
        "updated_time" = "2013-05-05T10:48:33+0000";
    };
}
4

1 回答 1

2

此数据不正确,不是 Facebook 提供的

{
   "data": [
      {

正如您上面的 JSON 所示

{
    data =     (
                {

有一个(时候应该有一个{

还要考虑不要公开提供您的访问令牌。

于 2013-05-05T13:02:47.650 回答