Android 从Facebook下载大图片
我想从facebbok下载大图像。我可以下载正常大小的图片并抛出以下代码::Android 从Facebook下载大图片,android,facebook,facebook-graph-api,Android,Facebook,Facebook Graph Api,我想从facebbok下载大图像。我可以下载正常大小的图片并抛出以下代码:: try{ phtoID.clear(); response = facebook.request(HelperActivity.wallAlbumID + "/photos"); JSONObject json = null; json = Uti
try{
phtoID.clear();
response = 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 url = a.getString("picture");
Log.d("URL",url);
URL imageURL = new URL(url);
Bitmap mIcon1 = BitmapFactory.decodeStream(imageURL
.openConnection().getInputStream());
phtoID.add(mIcon1);
}
试试看{
phtoID.clear();
response=facebook.request(HelperActivity.wallAlbumID
+“/照片”);
JSONObject json=null;
json=Util.parseJson(响应);
JSONArray photos=null;
photos=json.getJSONArray(“数据”);
对于(int i=0;i
帮助!!您实际上已经有了最大的照片。取而代之的是
picture
,而是images[0]。source
应该是图片的最大版本。每个images
元素还具有一个width
和height
属性,该属性以px为整数返回照片的大小
是查看API端点返回内容的绝佳工具。我没有收到错误。只想下载大尺寸图像。。