Mismatching API response in Streaming and REST API v1.1 for Retweet


#1

Hi,

I am working on iOS app in which it has features of showing timeline tweets and perform actions on each tweet. So I integrated streaming as well as REST API’s. I observed that the mismatch response is coming for the field “retweeted” in REST and streaming API for retweet. So the updating UI makes difficult for current user retweeted or not.

You can observe that “retweeted” value is 0 in case streaming and 1 for REST API in following responses:

Here is the response when firing retweet REST API: https://api.twitter.com/1.1/statuses/retweet/475940769031675904.json

Response:

{
    contributors = "<null>";
    coordinates = "<null>";
    "created_at" = "Mon Jun 09 10:01:36 +0000 2014";
    entities =     {
        hashtags =         (
        );
        symbols =         (
        );
        urls =         (
                        {
                "display_url" = "bit.ly/1oxPooI";
                "expanded_url" = "http://bit.ly/1oxPooI";
                indices =                 (
                    116,
                    138
                );
                url = "http://t.co/qhXQHgYd8r";
            }
        );
        "user_mentions" =         (
                        {
                id = 12513472;
                "id_str" = 12513472;
                indices =                 (
                    3,
                    11
                );
                name = "Cracked.com";
                "screen_name" = cracked;
            }
        );
    };
    "favorite_count" = 0;
    favorited = 0;
    geo = "<null>";
    id = 475940769031675904;
    "id_str" = 475940769031675904;
    "in_reply_to_screen_name" = "<null>";
    "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>";
    lang = en;
    place = "<null>";
    "possibly_sensitive" = 0;
    "retweet_count" = 1;
    retweeted = 1;
    "retweeted_status" =     {
        contributors = "<null>";
        coordinates = "<null>";
        "created_at" = "Mon Jun 09 10:01:15 +0000 2014";
        entities =         {
            hashtags =             (
            );
            symbols =             (
            );
            urls =             (
                                {
                    "display_url" = "bit.ly/1oxPooI";
                    "expanded_url" = "http://bit.ly/1oxPooI";
                    indices =                     (
                        103,
                        125
                    );
                    url = "http://t.co/qhXQHgYd8r";
                }
            );
            "user_mentions" =             (
            );
        };
        "favorite_count" = 0;
        favorited = 0;
        geo = "<null>";
        id = 475940682700312578;
        "id_str" = 475940682700312578;
        "in_reply_to_screen_name" = "<null>";
        "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>";
        lang = en;
        place = "<null>";
        "possibly_sensitive" = 0;
        "retweet_count" = 1;
        retweeted = 1;
        source = "<a href=\"https://about.twitter.com/products/tweetdeck\" rel=\"nofollow\">TweetDeck</a>";
        text = "Man hires a prostitute that turns out to be his daughter. 6 Crazy Sex Myths (That Are Actually True) - http://t.co/qhXQHgYd8r";
        truncated = 0;
        user =         {
            "contributors_enabled" = 0;
            "created_at" = "Mon Jan 21 23:02:47 +0000 2008";
            "default_profile" = 0;
            "default_profile_image" = 0;
            description = "America's only humor website.";
            entities =             {
                description =                 {
                    urls =                     (
                    );
                };
                url =                 {
                    urls =                     (
                                                {
                            "display_url" = "cracked.com";
                            "expanded_url" = "http://www.cracked.com";
                            indices =                             (
                                0,
                                22
                            );
                            url = "http://t.co/QeyHIFHtJx";
                        }
                    );
                };
            };
            "favourites_count" = 1386;
            "follow_request_sent" = 0;
            "followers_count" = 814765;
            following = 1;
            "friends_count" = 675;
            "geo_enabled" = 0;
            id = 12513472;
            "id_str" = 12513472;
            "is_translation_enabled" = 0;
            "is_translator" = 0;
            lang = en;
            "listed_count" = 10372;
            location = "Cracked.com";
            name = "Cracked.com";
            notifications = 0;
            "profile_background_color" = 000000;
            "profile_background_image_url" = "http://pbs.twimg.com/profile_background_images/470953123964387329/tX2UD_WB.jpeg";
            "profile_background_image_url_https" = "https://pbs.twimg.com/profile_background_images/470953123964387329/tX2UD_WB.jpeg";
            "profile_background_tile" = 0;
            "profile_banner_url" = "https://pbs.twimg.com/profile_banners/12513472/1401330089";
            "profile_image_url" = "http://pbs.twimg.com/profile_images/378800000647702587/ee63750889d579caa9d3f02e029a07e1_normal.jpeg";
            "profile_image_url_https" = "https://pbs.twimg.com/profile_images/378800000647702587/ee63750889d579caa9d3f02e029a07e1_normal.jpeg";
            "profile_link_color" = 1F98C7;
            "profile_sidebar_border_color" = 000000;
            "profile_sidebar_fill_color" = DAECF4;
            "profile_text_color" = 663B12;
            "profile_use_background_image" = 1;
            protected = 0;
            "screen_name" = cracked;
            "statuses_count" = 24471;
            "time_zone" = "Pacific Time (US & Canada)";
            url = "http://t.co/QeyHIFHtJx";
            "utc_offset" = "-25200";
            verified = 1;
        };
    };
    source = "<a href=\"http://www.apple.com\" rel=\"nofollow\">iOS</a>";
    text = "RT @cracked: Man hires a prostitute that turns out to be his daughter. 6 Crazy Sex Myths (That Are Actually True) - http://t.co/qhXQHgYd8r";
    truncated = 0;
    user =     {
        "contributors_enabled" = 0;
        "created_at" = "Wed Apr 30 12:37:26 +0000 2014";
        "default_profile" = 1;
        "default_profile_image" = 0;
        description = "";
        entities =         {
            description =             {
                urls =                 (
                );
            };
        };
        "favourites_count" = 39;
        "follow_request_sent" = 0;
        "followers_count" = 16;
        following = 0;
        "friends_count" = 32;
        "geo_enabled" = 0;
        id = 2470845109;
        "id_str" = 2470845109;
        "is_translation_enabled" = 0;
        "is_translator" = 0;
        lang = en;
        "listed_count" = 0;
        location = "";
        name = MeBrand;
        notifications = 0;
        "profile_background_color" = C0DEED;
        "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" = 0;
        "profile_image_url" = "http://pbs.twimg.com/profile_images/461485999994847232/1o7CA-Br_normal.png";
        "profile_image_url_https" = "https://pbs.twimg.com/profile_images/461485999994847232/1o7CA-Br_normal.png";
        "profile_link_color" = 0084B4;
        "profile_sidebar_border_color" = C0DEED;
        "profile_sidebar_fill_color" = DDEEF6;
        "profile_text_color" = 333333;
        "profile_use_background_image" = 1;
        protected = 0;
        "screen_name" = MeBrandUser;
        "statuses_count" = 198;
        "time_zone" = "<null>";
        url = "<null>";
        "utc_offset" = "<null>";
        verified = 0;
    };
}

and here is the response for streaming API for retweet:

    contributors = "<null>";
    coordinates = "<null>";
    "created_at" = "Mon Jun 09 10:01:36 +0000 2014";
    entities =     {
        hashtags =         (
        );
        symbols =         (
        );
        urls =         (
                        {
                "display_url" = "bit.ly/1oxPooI";
                "expanded_url" = "http://bit.ly/1oxPooI";
                indices =                 (
                    116,
                    138
                );
                url = "http://t.co/qhXQHgYd8r";
            }
        );
        "user_mentions" =         (
                        {
                id = 12513472;
                "id_str" = 12513472;
                indices =                 (
                    3,
                    11
                );
                name = "Cracked.com";
                "screen_name" = cracked;
            }
        );
    };
    "favorite_count" = 0;
    favorited = 0;
    "filter_level" = medium;
    geo = "<null>";
    id = 475940769031675904;
    "id_str" = 475940769031675904;
    "in_reply_to_screen_name" = "<null>";
    "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>";
    lang = en;
    place = "<null>";
    "possibly_sensitive" = 0;
    "retweet_count" = 0;
    retweeted = 0;
    "retweeted_status" =     {
        contributors = "<null>";
        coordinates = "<null>";
        "created_at" = "Mon Jun 09 10:01:15 +0000 2014";
        entities =         {
            hashtags =             (
            );
            symbols =             (
            );
            urls =             (
                                {
                    "display_url" = "bit.ly/1oxPooI";
                    "expanded_url" = "http://bit.ly/1oxPooI";
                    indices =                     (
                        103,
                        125
                    );
                    url = "http://t.co/qhXQHgYd8r";
                }
            );
            "user_mentions" =             (
            );
        };
        "favorite_count" = 0;
        favorited = 0;
        geo = "<null>";
        id = 475940682700312578;
        "id_str" = 475940682700312578;
        "in_reply_to_screen_name" = "<null>";
        "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>";
        lang = en;
        place = "<null>";
        "possibly_sensitive" = 0;
        "retweet_count" = 1;
        retweeted = 0;
        source = "<a href=\"https://about.twitter.com/products/tweetdeck\" rel=\"nofollow\">TweetDeck</a>";
        text = "Man hires a prostitute that turns out to be his daughter. 6 Crazy Sex Myths (That Are Actually True) - http://t.co/qhXQHgYd8r";
        truncated = 0;
        user =         {
            "contributors_enabled" = 0;
            "created_at" = "Mon Jan 21 23:02:47 +0000 2008";
            "default_profile" = 0;
            "default_profile_image" = 0;
            description = "America's only humor website.";
            "favourites_count" = 1386;
            "follow_request_sent" = "<null>";
            "followers_count" = 814765;
            following = "<null>";
            "friends_count" = 675;
            "geo_enabled" = 0;
            id = 12513472;
            "id_str" = 12513472;
            "is_translation_enabled" = 0;
            "is_translator" = 0;
            lang = en;
            "listed_count" = 10372;
            location = "Cracked.com";
            name = "Cracked.com";
            notifications = "<null>";
            "profile_background_color" = 000000;
            "profile_background_image_url" = "http://pbs.twimg.com/profile_background_images/470953123964387329/tX2UD_WB.jpeg";
            "profile_background_image_url_https" = "https://pbs.twimg.com/profile_background_images/470953123964387329/tX2UD_WB.jpeg";
            "profile_background_tile" = 0;
            "profile_banner_url" = "https://pbs.twimg.com/profile_banners/12513472/1401330089";
            "profile_image_url" = "http://pbs.twimg.com/profile_images/378800000647702587/ee63750889d579caa9d3f02e029a07e1_normal.jpeg";
            "profile_image_url_https" = "https://pbs.twimg.com/profile_images/378800000647702587/ee63750889d579caa9d3f02e029a07e1_normal.jpeg";
            "profile_link_color" = 1F98C7;
            "profile_sidebar_border_color" = 000000;
            "profile_sidebar_fill_color" = DAECF4;
            "profile_text_color" = 663B12;
            "profile_use_background_image" = 1;
            protected = 0;
            "screen_name" = cracked;
            "statuses_count" = 24471;
            "time_zone" = "Pacific Time (US & Canada)";
            url = "http://www.cracked.com";
            "utc_offset" = "-25200";
            verified = 1;
        };
    };
    source = "<a href=\"http://www.apple.com\" rel=\"nofollow\">iOS</a>";
    text = "RT @cracked: Man hires a prostitute that turns out to be his daughter. 6 Crazy Sex Myths (That Are Actually True) - http://t.co/qhXQHgYd8r";
    truncated = 0;
    user =     {
        "contributors_enabled" = 0;
        "created_at" = "Wed Apr 30 12:37:26 +0000 2014";
        "default_profile" = 1;
        "default_profile_image" = 0;
        description = "<null>";
        "favourites_count" = 39;
        "follow_request_sent" = "<null>";
        "followers_count" = 16;
        following = "<null>";
        "friends_count" = 32;
        "geo_enabled" = 0;
        id = 2470845109;
        "id_str" = 2470845109;
        "is_translation_enabled" = 0;
        "is_translator" = 0;
        lang = en;
        "listed_count" = 0;
        location = "";
        name = MeBrand;
        notifications = "<null>";
        "profile_background_color" = C0DEED;
        "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" = 0;
        "profile_image_url" = "http://pbs.twimg.com/profile_images/461485999994847232/1o7CA-Br_normal.png";
        "profile_image_url_https" = "https://pbs.twimg.com/profile_images/461485999994847232/1o7CA-Br_normal.png";
        "profile_link_color" = 0084B4;
        "profile_sidebar_border_color" = C0DEED;
        "profile_sidebar_fill_color" = DDEEF6;
        "profile_text_color" = 333333;
        "profile_use_background_image" = 1;
        protected = 0;
        "screen_name" = MeBrandUser;
        "statuses_count" = 197;
        "time_zone" = "<null>";
        url = "<null>";
        "utc_offset" = "<null>";
        verified = 0;
    };
}

Please look into this issue.