2013-02-11 58 views
1

我使用了圖形API API Json Facebook Wall POst圖像的響應和顯示在我的APP中,我成功地獲得了它。但圖像看起來很模糊..請電話我如何獲得清晰的圖像像在Facebook中如何在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

使用"/picture?type=large"代替"/picture?type=normal"得到一個更大的圖片。

+0

非常感謝!讓我們現在嘗試 – 2013-02-11 14:20:00

+0

我沒有要求獲取圖像大小..我上傳的帖子,不好看..我看起來像一個模糊的圖像。所以我們如何才能獲得清晰的圖像任何代碼你有PLZ幫助我..在此先感謝 – 2013-02-14 05:53:25

0

儘管?type=large提供了更大的圖像,但對於xhdpi顯示器而言可能還不夠大。你現在可以實際指定一個實際大小,他們會盡最大努力來實現它。

例如,這使您馬克·扎克伯格的一個大廣場:

http://graph.facebook.com/4/picture?width=500&height=500 
+0

非常感謝 – 2013-02-14 05:37:23