Hey there,

I’m currently unsure what fields I should be using to retrieve media attachments of retweeted tweets

I can find all details of the retweeted tweet, including the media key within the includes.tweets.attachment array i.e.

[attachments] => stdClass Object
                                (
                                    [media_keys] => Array
                                        (
                                            [0] => 3_1280962635563970561
                                        )

                                )

However, when I drill down into the includes.media array, the array only returns details and media keys for non referenced tweets, so I’m unable to retrieve an image for a retweeted tweet for example without making additional API requests on a per tweet basis

The full API request URL currently is

https://api.twitter.com/2/tweets/search/recent?query=sunrise&tweet.fields=id,text,lang,created_at,possibly_sensitive,public_metrics,author_id,geo,source,referenced_tweets,entities,attachments&user.fields=created_at,name,location,profile_image_url,verified,withheld,public_metrics&expansions=author_id,referenced_tweets.id,referenced_tweets.id.author_id,geo.place_id,attachments.media_keys&media.fields=preview_image_url,type,url,public_metrics,media_key&place.fields=contained_within,country&max_results=100

Am I missing something?

Thanks

I’m having the same issue. Is there a way to get the media objects of referenced tweets included in the response? Seems unreasonable to have to make an additional call for each referenced tweet just to get the media for it

Wondering the same thing. Is there a way to construct the request to return this data or is this something that v2 does not support? If the latter, are there any plans to support it?