def get_tweet_data(tweet_id):
status_data = client.get_tweet(
tweet_id,
tweet_fields=[‘created_at’, ‘entities’, ‘attachments’],
expansions=[‘author_id’, ‘attachments.media_keys’],
user_fields=[‘profile_image_url’],
media_fields=[‘url’, ‘preview_image_url’, ‘type’]
)
return status_data
Using this code, can’t get the preview image url of media.
I tried to solve this issue, but it was failed.
Artur Abdusametov is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.