我使用了facebook Wall POst Images的图形API Json Response并在我的APP中显示我成功获得了它。但图像看起来非常模糊..请告诉我如何在Facebook中获得清晰的图像
这是我的代码
URL url=new URL("http://graph.facebook.com/"+hashMap.get("id")+"/picture?type=normal");
Bitmap bitmap=BitmapFactory.decodeStream(url.openConnection().getInputStream());
((ImageView)view.findViewById(R.id.imageView_ProfilePicture)).setImageBitmap(bitmap);
url=new URL(hashMap.get("picture_url"));
bitmap=BitmapFactory.decodeStream(url.openConnection().getInputStream());
((ImageView)view.findViewById(R.id.imageView_FullImage)).setImageBitmap(bitmap);
在AsynTask中
dobackground(){
hashMap.put("picture_url", data.getJSONObject(i).getString("picture"));
}
答案 0 :(得分:0)
使用"/picture?type=large"
代替"/picture?type=normal"
来获得更大的图片。
答案 1 :(得分:0)
虽然?type=large
提供了更大的图像,但它可能仍然不足以显示xhdpi。您现在可以实际指定实际尺寸,他们会尽力实现它。
例如,这为你提供了一个大广场的马克扎克伯格:
http://graph.facebook.com/4/picture?width=500&height=500