0
我試圖獲取專輯的所有照片...我正在獲取專輯列表以及它們的照片,但所有照片均爲示例圖像。Facebook專輯照片未在Android中顯示
這是代碼::
try {
response = EditPhotoActivity.facebook.request(HelperActivity.wallAlbumID+ "/photos");
JSONObject json = null;
json = Util.parseJson(response);
JSONArray photos = null;
photos = json.getJSONArray("data");
for (int i = 0; i < photos.length(); i++) {
JSONObject a = null;
a = photos.getJSONObject(i);
String id = a.getString("id");
URL img_value = new URL(
"http://graph.facebook.com/" + id
+ "/picture?type=normal");
Bitmap mIcon1 = BitmapFactory
.decodeStream(img_value
.openConnection()
.getInputStream());
phtoID.add(mIcon1);
Log.d("photo size", "" + phtoID.size());
}
next();
albumLength = phtoID.size();
Log.d("albumLength", "" + albumLength);
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
Thnq ..我修正了它... – user1 2012-08-18 05:33:24
如果它幫助你修復它,你應該接受這個答案,以便其他查看這個問題的人知道他們可以使用這個答案作爲參考。 – 2012-08-18 05:59:41
我接受了它..但我不能投票給你...在stackoverflow上的新帳戶... – user1 2012-08-18 09:57:36