Al Belmondo
Al Belmondo

Reputation: 784

How to determine a tweet contains a video link with the twitter api?

I am using the twitter api to pull back a users tweets. I then want to loop through the tweets and if a tweet contains a video (ex. a link to a youtube vid) I want to display the video in my page. The issue is it doesn't seem like there is anything in the JSON returned by the twitter API when calling the user_timelime REST function to determine that a tweet contains a link to a video. I know I could scan the url passed back for the word "youtube" but I want this to scale across any site the user plugs a link into that contains a video.

I may be missing something in the JSON twitter is giving back but I am not to sure.

Any help is appreciated.

Upvotes: 0

Views: 4345

Answers (1)

Mike Grigorieff
Mike Grigorieff

Reputation: 66

See this link https://dev.twitter.com/overview/api/entities-in-twitter-objects#extended_entities

Twitter API provides all URLs to the media files included in the tweet

Upvotes: 2

Related Questions