Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/swift/18.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 获取Twitter个人资料照片_Java_Android_Twitter_Twitter4j - Fatal编程技术网

Java 获取Twitter个人资料照片

Java 获取Twitter个人资料照片,java,android,twitter,twitter4j,Java,Android,Twitter,Twitter4j,我正在尝试创建一个带有特殊标签的tweets界面,我想在tweets中添加一张个人资料照片,有没有办法使用twitter4j获取twitter个人资料照片?是的,你可以。您必须获得状态,然后: status.getUser().getProfileImageURL(); //returns a string which is profile image url 有关详细用法: 是的,你可以。您必须获得状态,然后: status.getUser().getProfileImageURL();

我正在尝试创建一个带有特殊标签的tweets界面,我想在tweets中添加一张个人资料照片,有没有办法使用twitter4j获取twitter个人资料照片?

是的,你可以。您必须获得状态,然后:

status.getUser().getProfileImageURL(); //returns a string which is profile image url
有关详细用法:


是的,你可以。您必须获得状态,然后:

status.getUser().getProfileImageURL(); //returns a string which is profile image url
有关详细用法:


检查以下代码

Assume that the Twitter object is mytTwitter
*get the user from the twitter object

User user = mytTwitter.showUser(mytTwitter.getid());

*get the profile image URL

URL url = user.getProfileImageURL();


*create Image icon

ImageIcon img = new ImageIcon(url);

*set the JLabel icon to be the ImageIcon

Jlabel1.setIcon(img);

检查以下代码

Assume that the Twitter object is mytTwitter
*get the user from the twitter object

User user = mytTwitter.showUser(mytTwitter.getid());

*get the profile image URL

URL url = user.getProfileImageURL();


*create Image icon

ImageIcon img = new ImageIcon(url);

*set the JLabel icon to be the ImageIcon

Jlabel1.setIcon(img);

我在使用android,如何从url加载imageview?要从url加载图像,请使用URLImageViewHelper库,转到下面的链接,下载库并按照下面的URLImageViewHelper.setUrlDrawable为图像编写代码(这个,holder.imageview,url,R.drawable.temp_profile_pic_占位符);我在使用android,如何从url加载imageview?要从url加载图像,请使用URLImageViewHelper库,转到下面的链接,下载库并按照下面的URLImageViewHelper.setUrlDrawable为图像编写代码(这个,holder.imageview,url,R.drawable.temp_profile_pic_占位符);谢谢你的帮助:)谢谢你的帮助:)