I am getting profile image from Facebook SDK, it returns me a url. When I open it in browser it shows the image. But when I convert it into bitmap, it returns null. Here is my code:
String id = user.getId();
try {
      URL image_path = new URL("http://graph.facebook.com/"+ id+ "/picture?type=large");
      Bitmap profPict = BitmapFactory.decodeStream(image_path.openConnection().getInputStream());
      System.out.println("profPict::> " + profPict);
      ImageView img= (ImageView)findViewById(R.id.textView2);
      img.setImageBitmap(profPict);
      System.out.println("image::> " + image_path);
}
catch (Exception e) {
      e.printStackTrace();
} 
 
     
     
    