json - How to download different sizes of an image from Twitter? -


i'm using twitter streaming api images included in tweets, , show them in android app. media object represents image contains media_url field direct link image, , json objects named sizes contains different sizes available image. question is, how can such resized images? want download thumbnail directly twitter, , since sizes object contains thumb field should possible, how? tried concat ?size=thumb media_url didn't work. media object example:

{"id":897839774635053000,"id_str":"897839774635053056","indices": [75,98],"media_url":"http://pbs.twimg.com/media/dhxehkbw0aakhf3.jpg", "media_url_https":"https://pbs.twimg.com/media/dhxehkbw0aakhf3.jpg", "url":"https://removed/4ncw6720zj","display_url":"pic.twitter.com/4ncw6720zj", "expanded_url": "https://twitter.com/darioolly/status/897840123924164608/photo/1", "type":"photo",  "sizes":{"thumb":{"w":150,"h":150,"resize":"crop"},          "medium":{"w":720,"h":711,"resize":"fit"},          "small":{"w":680,"h":672,"resize":"fit"},          "large":{"w":720,"h":711,"resize":"fit"}}} 


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -