我正在尝试获取专辑的所有照片...我正在获取专辑列表以及它们的照片,但所有照片都是示例图像。
这是代码::
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();
}