Retweet missing media of original tweet in API response


#1

Hi all,

I’m investigating a problem where my retweets via the API seem to be ‘disappearing’, and in the course of collecting more info, I’ve run into the problem described below.

I retweeted this tweet on Dec 16, 2017: https://twitter.com/aish_doubi/status/941749162198163456 . This tweet has one media in it, i.e. the artwork. When I request this tweet from the API via statuses/show/id, I get a correct response.

However, when I request the retweet via the API (link: https://twitter.com/antsstyle/status/941843502266118144 ), the media entities array is empty. All the other fields in the API response seem to be fine though.

Is this intended behaviour after a certain period of time? I have tweet_mode_extended enabled, so I’m not sure yet why this would be happening.


#2

I’m having the same issue with missing media. Here are two retweets from the same account. Both of the original tweets have media, but only one of the retweets has media:

https://twitter.com/GLHL1/status/961405316859604993
https://twitter.com/GLHL1/status/962527917568913408


#3

For Tweet ID 941843502266118144 I see that the extended_entities node (containing the media entities) is present inside the retweeted_status node, which is what I would expect.


#4

With tweet_mode=extended on the API calls, both of these Tweets include extended_entities.media values in the response as far as I can see.


#5

Ah, I think I’ve gotten myself confused somewhere - for some reason I thought the retweet contained the same media as the original tweet rather than in the retweeted_status object. The API calls work correctly when I do them manually, so it’s working as expected, just got mixed up somewhere along the way.

Thanks for the help Andy, sorry for the confusion :slight_smile:


#6

Hey @andypiper, I think I’ve discovered where my confusion came from: I’ve just tested with a couple of different tweets and my retweets that I’ve been investigating, and came up with inconsistent results. Some examples are below.

First case:
Tweet ID 946291989279997952 (original tweet by ydh2101) contains 1 media entity, as expected.
Tweet ID 946958386767286272 (my retweet of that tweet) contains 1 media entity directly inside the response, not in the retweeted_status node, which I wasn’t expecting to be there given the information in your last post.

Second case:
Tweet ID 946096188763205632 (original tweet by Zolaiida) contains 1 media entity, as expected.
Tweet ID 946995635068207104 (my retweet of that tweet) contains no media entities.

Do you know why it’s different between these cases? I would have assumed that either the retweet consistently contains no media except in the retweeted_status node, or that it’s always there, but it seems to vary.

I’m slowly running through a table of 2000 tweets and their associated retweets testing for a different issue, so I can probably find other examples of this behaviour if required.


#7

My examples are similar to what @antsstyle is seeing. Both of the tweets I listed do contain retweeted_status.extended_entities.media but only one of them contains extended_entities.media and entities.media


#8

@vipucks As I understand it, only the extended_entities.media array is relevant when retrieving media in tweets - the entities.media array is a legacy object, back from when Twitter only allowed a single photo in tweets as media. (See https://developer.twitter.com/en/docs/tweets/data-dictionary/overview/extended-entities-object)

Sorry if you were already aware of that, just thought I’d point it out :slight_smile:

The examples I have are missing extended_entities.media in some cases and not others, which is where I’d expect the media information to be either consistently present or absent.


#9

We can ignore the entities.media array but I still think we are both seeing the same problem. I looked at all the example retweets you’ve given and my examples have the same issue:

The retweets are missing extended_entities.media in some cases and not others, while retweeted_status.extended_entities.media is always present


#10

Yeah, that’s it. It’s not exactly a big problem, but it’s a bit confusing/inconsistent.