更大的 Twitter 用户个人资料图片 [英] Bigger Twitter user profile image

查看:32
本文介绍了更大的 Twitter 用户个人资料图片的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一款应用,可显示用户的推文及其图片.但是显示的图像非常小.我想要通常显示在他们的个人资料上的图像(通常为 128*128).这是我的相关代码:

I'm developing an app that displays users' tweets along with their image. But the image being displayed is very small. I want the image (usual 128*128) one that is usually displayed on their profiles. Here's my relevant code:

foreach($ret1->results as $x)
{
     echo "<div class='ttl'><div class='ttlpadding'><div class='item'><a href=\"","http://www.twitter.com/".$x->from_user,"\" target=\"_blank\"><img src=\"",$x->profile_image_url,"\" title=\"", $x->from_user." (".$x->from_user_name.")", "\" /></a>\n";

    $text = preg_replace('/\s+#(\w+)/',' <a href="http://search.twitter.com/search?q=%23$1">#$1</a>', $x->text);
    echo "<div class='clr'></div>";
    echo "<div class='tweet'>".$text."</div></div></div></div><div class='clrflt'></div>";
}

推荐答案

你可以试试

substr($x->profile_image_url,[index-start],strlen($x->profile_image_url)[index-end]).'jpg'

这将返回用户上传的原始图像.

This will return the original images uploaded by the users.

这篇关于更大的 Twitter 用户个人资料图片的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆