Obtener fotos de la API de línea de tiempo de inicio de Twitter

Anyone know if it's possible to grab all posts with an image, from the Twitter API? I know I can check all tweets for a media, but that's a bit slow process.

preguntado el 09 de marzo de 12 a las 15:03

2 Respuestas

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

es decir, https://api.twitter.com/1/statuses/user_timeline.json?screen_name=twitter&include_entities=true

Then, look for any media_url elements; those will contain the URL to any photos. It may contain video links, so you'll have to filter for common image types (.png/ .jpg/ .gif/ etc).

Respondido 06 Oct 12, 13:10

Tanto como include_entities=true, puedes usar filter:images to request only tweets that include images. But that only seems to work on a search request, not a timeline request. Hope it helps anyway.

Respondido 26 Feb 17, 12:02

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.