5 min read

「Twitterデータ」にretweeted_statusがない問題

解決策ではありません。
ただの情報です。

昔は「全ツイート履歴」なるものあったよね。あれにはちゃんとretweeted_statusあったよね。

説明めんどくせえJSON垂れ流すぞ

  • オリジナルのツイートID(つまり@botamochi5522のツイート): 931006472997052418
  • リツイートしたツイートのID(つまり@sugtao4423のツイート): 931006516882112514

全ツイート履歴で取得できてたJSON

ふつうにAPI経由で取ってきたのとまったく同じ。
なのですごい使いやすかった。

{
    "created_at": "Thu Nov 16 03:50:25 +0000 2017",
    "id": 931006516882112500,
    "id_str": "931006516882112514",
    "full_text": "RT @botamochi5522: Twitter界最上位凍結候補\n@sugtao4423",
    "truncated": false,
    "display_text_range": [
        0,
        46
    ],
    "entities": {
        "hashtags": [],
        "symbols": [],
        "user_mentions": [
            {
                "screen_name": "botamochi5522",
                "name": "おもち",
                "id": 2684697199,
                "id_str": "2684697199",
                "indices": [
                    3,
                    17
                ]
            },
            {
                "screen_name": "sugtao4423",
                "name": "yui",
                "id": 176403675,
                "id_str": "176403675",
                "indices": [
                    35,
                    46
                ]
            }
        ],
        "urls": []
    },
    "source": "<a href=\"https://twitter.com/sugtao4423\" rel=\"nofollow\">ShootingStar for たおっぱい</a>",
    "in_reply_to_status_id": null,
    "in_reply_to_status_id_str": null,
    "in_reply_to_user_id": null,
    "in_reply_to_user_id_str": null,
    "in_reply_to_screen_name": null,
    "user": {
        "id": 176403675,
        "id_str": "176403675",
        "name": "yui",
        "screen_name": "sugtao4423",
        "location": "にぱ~",
        "description": "(๑•﹏•๑*)",
        "url": "https://t.co/WewYuQDVTb",
        "entities": {
            "url": {
                "urls": [
                    {
                        "url": "https://t.co/WewYuQDVTb",
                        "expanded_url": "https://sugtao4423.xyz/profile",
                        "display_url": "sugtao4423.xyz/profile",
                        "indices": [
                            0,
                            23
                        ]
                    }
                ]
            },
            "description": {
                "urls": []
            }
        },
        "protected": false,
        "followers_count": 1090,
        "friends_count": 225,
        "listed_count": 46,
        "created_at": "Mon Aug 09 12:58:00 +0000 2010",
        "favourites_count": 190769,
        "utc_offset": null,
        "time_zone": null,
        "geo_enabled": true,
        "verified": false,
        "statuses_count": 447081,
        "lang": null,
        "contributors_enabled": false,
        "is_translator": false,
        "is_translation_enabled": false,
        "profile_background_color": "E0FFFF",
        "profile_background_image_url": "http://abs.twimg.com/images/themes/theme1/bg.png",
        "profile_background_image_url_https": "https://abs.twimg.com/images/themes/theme1/bg.png",
        "profile_background_tile": true,
        "profile_image_url": "http://pbs.twimg.com/profile_images/495615401481363457/OaMLwv-m_normal.png",
        "profile_image_url_https": "https://pbs.twimg.com/profile_images/495615401481363457/OaMLwv-m_normal.png",
        "profile_banner_url": "https://pbs.twimg.com/profile_banners/176403675/1402563917",
        "profile_image_extensions_alt_text": null,
        "profile_banner_extensions_alt_text": null,
        "profile_link_color": "0084B4",
        "profile_sidebar_border_color": "FFFFFF",
        "profile_sidebar_fill_color": "E0FFFF",
        "profile_text_color": "333333",
        "profile_use_background_image": true,
        "has_extended_profile": false,
        "default_profile": false,
        "default_profile_image": false,
        "following": false,
        "follow_request_sent": false,
        "notifications": false,
        "translator_type": "none"
    },
    "geo": null,
    "coordinates": null,
    "place": null,
    "contributors": null,
    "retweeted_status": {
        "created_at": "Thu Nov 16 03:50:15 +0000 2017",
        "id": 931006472997052400,
        "id_str": "931006472997052418",
        "full_text": "Twitter界最上位凍結候補\n@sugtao4423",
        "truncated": false,
        "display_text_range": [
            0,
            27
        ],
        "entities": {
            "hashtags": [],
            "symbols": [],
            "user_mentions": [
                {
                    "screen_name": "sugtao4423",
                    "name": "yui",
                    "id": 176403675,
                    "id_str": "176403675",
                    "indices": [
                        16,
                        27
                    ]
                }
            ],
            "urls": []
        },
        "source": "<a href=\"https://about.twitter.com/products/tweetdeck\" rel=\"nofollow\">TweetDeck</a>",
        "in_reply_to_status_id": null,
        "in_reply_to_status_id_str": null,
        "in_reply_to_user_id": null,
        "in_reply_to_user_id_str": null,
        "in_reply_to_screen_name": null,
        "user": {
            "id": 2684697199,
            "id_str": "2684697199",
            "name": "おもち",
            "screen_name": "botamochi5522",
            "location": "東京都",
            "description": "PHPとOpenstackを愛するお餅界のモチ \n職業 Web Application Engineer",
            "url": null,
            "entities": {
                "description": {
                    "urls": []
                }
            },
            "protected": false,
            "followers_count": 2123,
            "friends_count": 4220,
            "listed_count": 66,
            "created_at": "Sun Jul 27 09:55:18 +0000 2014",
            "favourites_count": 87872,
            "utc_offset": null,
            "time_zone": null,
            "geo_enabled": true,
            "verified": false,
            "statuses_count": 227517,
            "lang": null,
            "contributors_enabled": false,
            "is_translator": false,
            "is_translation_enabled": false,
            "profile_background_color": "FFFFFF",
            "profile_background_image_url": "http://abs.twimg.com/images/themes/theme9/bg.gif",
            "profile_background_image_url_https": "https://abs.twimg.com/images/themes/theme9/bg.gif",
            "profile_background_tile": true,
            "profile_image_url": "http://pbs.twimg.com/profile_images/1120423354152910855/YzKwryuM_normal.png",
            "profile_image_url_https": "https://pbs.twimg.com/profile_images/1120423354152910855/YzKwryuM_normal.png",
            "profile_banner_url": "https://pbs.twimg.com/profile_banners/2684697199/1478021394",
            "profile_image_extensions_alt_text": null,
            "profile_banner_extensions_alt_text": null,
            "profile_link_color": "000000",
            "profile_sidebar_border_color": "000000",
            "profile_sidebar_fill_color": "000000",
            "profile_text_color": "000000",
            "profile_use_background_image": true,
            "has_extended_profile": true,
            "default_profile": false,
            "default_profile_image": false,
            "following": true,
            "follow_request_sent": false,
            "notifications": false,
            "translator_type": "none"
        },
        "geo": null,
        "coordinates": null,
        "place": null,
        "contributors": null,
        "is_quote_status": false,
        "retweet_count": 1,
        "favorite_count": 1,
        "favorited": false,
        "retweeted": true,
        "lang": "ja"
    },
    "is_quote_status": false,
    "retweet_count": 1,
    "favorite_count": 0,
    "favorited": false,
    "retweeted": true,
    "lang": "ja"
}

現状の「Twitterデータ」で取得できるJSON

"retweeted": falseだしretweeted_statusもないクソ

{
    "retweeted": false,
    "source": "<a href=\"https://twitter.com/sugtao4423\" rel=\"nofollow\">ShootingStar for たおっぱい</a>",
    "entities": {
        "hashtags": [],
        "symbols": [],
        "user_mentions": [
            {
                "name": "おもち note10plusをゲット!",
                "screen_name": "botamochi5522",
                "indices": [
                    "3",
                    "17"
                ],
                "id_str": "2684697199",
                "id": "2684697199"
            },
            {
                "name": "yui",
                "screen_name": "sugtao4423",
                "indices": [
                    "35",
                    "46"
                ],
                "id_str": "176403675",
                "id": "176403675"
            }
        ],
        "urls": []
    },
    "display_text_range": [
        "0",
        "46"
    ],
    "favorite_count": "0",
    "id_str": "931006516882112514",
    "truncated": false,
    "retweet_count": "0",
    "id": "931006516882112514",
    "created_at": "Thu Nov 16 03:50:25 +0000 2017",
    "favorited": false,
    "full_text": "RT @botamochi5522: Twitter界最上位凍結候補\n@sugtao4423",
    "lang": "ja"
}

は?

"retweeted": falseでリツートなのかすらわからん。
それはいいとしてもretweeted_statusオブジェクトすらもなくてもうなにもできない。

「全ツイート履歴」をかえして

ニコ動のニコるくんも復活したんや。全ツイート履歴をかえして。

報告はした。ついでにUserStreamもかえして。