Media Entity Missing From API. How to get properly.?

media
api

#1

I found that in some tweets there is missing media entities, when tweet has video or gif. For example:

Object
contributors
:
null
coordinates
:
null
created_at
:
"Fri Jul 28 10:19:04 +0000 2017"
entities
:
Object
hashtags
:
Array(0)
symbols
:
Array(0)
urls
:
Array(1)
user_mentions
:
Array(0)
proto
:
Object
favorite_count
:
0
favorited
:
false
geo
:
null
id
:
890879272218312700
id_str
:
"890879272218312704"
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
is_quote_status
:
false
lang
:
"en"
place
:
null
possibly_sensitive
:
false
retweet_count
:
0
retweeted
:
false
source
:
"Twitter Web Client"
text
:
"Say more about what’s happening! Rolling out now: photos, videos, GIFs, polls, and Quote Tweets no longer count tow… https://t.co/C45SgmQeki"
truncated
:
true


#2

truncated: true is an indication that this is an extended Tweet so you need to use tweet_mode=extended to retrieve it from the API with complete set of objects. See more here.