Mam takyto request na "cover photo" albumu, kde "tag" je ID albumu na facebooku:
Kód:
for (int i=0; i<iconCount; i++) {
String tag = albums.getChildAt(0).findViewById(i).getTag().toString();
if (session.isOpened()) {
new Request( session, "/" + tag + "/picture", params, HttpMethod.GET, albumIconImageRequest ).executeAsync(); }
else {
Toast.makeText(getActivity(), "Session is not opened", Toast.LENGTH_LONG).show(); }
}
A tu je vratena hodnota
response:
Kód:
private Request.Callback albumIconImageRequest = new Request.Callback() {
@Override
public void onCompleted(Response response) {
onAlbumIconImageRequestCompleted(response);
}
};
Lenze podla dokumentacie:
https://developers.facebook.com/docs/gr ... um/picture Citácia:
No fields are returned, instead you will receive the image file itself.
Keby ze to vracalo nejaky JSON objekt s URL adresou toho obrazku - tak ako vacsina requestov, tak by to nebol problem. Ale ako mozem teraz vytiahnut ten obrazok z "response" a zobrazit ho v nejakom ImageView, ked to vracia "image file itself"? Vracia to nejaky objekt, ktoreho trieda je nejaka $Proxy0 a nejde to ani pretypovat na File.