Get photos from the timeline tweeter interface

Does anyone know if it is possible to capture all messages with an image from the Twitter API? I know that I can check all the tweets for the medium, but this is a bit slow process.

+5
source share
2 answers

First of all, you need to include include_entities=trueas part of the request:

i.e. https://api.twitter.com/1/statuses/user_timeline.json?screen_name=twitter&include_entities=true

Then find any items media_url; they will contain the url for any photos. It may contain video links, so you have to filter out common image types ( .png / .jpg / .gif / etc.) ..

+4
source

Like include_entities=true, you can use filter:imagesto request only tweets containing images. But this, it seems, only works on a search query, not a timeline query. Hope it helps anyway.

0
source

All Articles