Pariah
Pariah

Reputation: 17

Twitter api doesn't send media element with timeline

So I am using the twitter node module and twitters rest api to fetch timelines. All works well, except that attached images do not get sent with the response. Even after I added "include_entities: true" to the options object.

I'm talking about an image directly attached to a twitter post, links get displayed just fine.

I simply can't find a way to get it to display, any help is appreciated.

Upvotes: 0

Views: 442

Answers (1)

Gopesh Sharma
Gopesh Sharma

Reputation: 7030

Every tweet has a Media Entity attached to it. You need to find the Media Id and then get the URL from -mediaURL. The below picture shows the full object model.

enter image description here

PC : https://www.visual-paradigm.com/tutorials/rest-api-design-twitter-example.jsp

Upvotes: 1

Related Questions