tweets - How to get "bigger-size" user image with Twitter API 1.1? -
i'm trying last 5 tweets person. did it, profile picture not looking normal, resolution corrupted. that. ! http://i.hizliresim.com/wlqejz.jpg
var $twitter = $('#twitter'); $.getjson('http://www.demo.net/twitter.php?username=yeniceriozcan&count=5', function(data){ var total = data.length, = 0; $twitter.html(''); // önce içindekini temizle sonra tweetleri yazdır. ( i; < total; i++ ){ var tweet = data[i].text; // tweet var date = parsetwitterdate(data[i].created_at); // tarih var image = data[i].user.profile_image_url; // profil resmi var url = 'https://twitter.com/' + data[i].user.screen_name +'/status/' + data[i].id_str; $twitter.append('<div class="tweet"><a target="_blank" href="' + url + '"><img src="' + image + '" alt="" class="profile-image" />' + tweet + '</a> <span class="tweet-date">(' + date + ')</span></div>'); } });
this code. tried profile picture,
var image = data[i].user.profile_image_url;
and in other tweets file,
$tweets = $twitter->get('https://api.twitter.com/1.1/statuses/user_timeline.json?screen_name='.$username.'&count='.$count); print json_encode($tweets);
i used api.
but can not view pictures in normal resolutions. how can fix it? thanks.
i found using bigger still brought picture in relatively small format. using answer enables resize image allowing have big image without distortion.
if want image full size rid of "_normal" completely
http://pbs.twimg.com/profile_images/429221067630972918/ablbus9o_normal.jpeg
goes to
http://pbs.twimg.com/profile_images/429221067630972918/ablbus9o.jpeg
note: urls in answer modified not reflect twitter details hence why entering them give "no page exists"
Comments
Post a Comment