1

我使用了 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"));
}
4

2 回答 2

0

While ?type=large provides a bigger image it may still not be large enough for a xhdpi display. You can actually specify a actual size now and they'll try their best to fulfill it.

For example this gives you a large square of Mark Zuckerberg:

http://graph.facebook.com/4/picture?width=500&height=500
于 2013-02-11T14:51:43.560 回答
0

使用"/picture?type=large"而不是"/picture?type=normal"获得稍大的画面。

于 2013-02-11T14:03:14.370 回答