You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
all of them printed out empty includes fields
the last line raised the error KeyError: url, which means the function does not actually return the fields I ask for.
The text was updated successfully, but these errors were encountered:
Response.includes returns objects requested through expansions.
You aren't requesting any expansions, so Response.includes is an empty dictionary as expected.
Without expansions, there are no media objects for that Twitter API endpoint to return, since it provides Tweets, so there are no media objects for which to return the single url field that you are requesting.
I tried searching on stackoverflow but there seems to be no example with tweepy v4.
I also checked the doc about this problem:
https://docs.tweepy.org/en/v4.6.0/faq.html#why-am-i-not-getting-expansions-or-fields-data-with-api-v2-using-client
when I tried the codes below:
all of them printed out empty
includes
fieldsthe last line raised the error
KeyError: url
, which means the function does not actually return the fields I ask for.The text was updated successfully, but these errors were encountered: