I have an android game which users can login with facebook and play with their facebook friends. I am seeing a lot of comments about missing facebook profile pictures.
The below code does not work anymore. BitmapFactory.decodeStream returns null. I am sure the url is correct, because till yesterday the app could display facebook profile pictures. What could have been changed?
Thanks.
public static Bitmap getBitmapFromURL(String src) {
try {
URL url = new URL(src);
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
InputStream input = connection.getInputStream();
Bitmap myBitmap = BitmapFactory.decodeStream(input);
return myBitmap;
} catch (IOException e) {
Gdx.app.log(TAG, "Failed to download image from " + src, e);
return null;
}
}