title: Android - get facebook profile picture
body: <p>I don't know why, but I am always getting null when I try to get the profile picture of the user. Do I need to set some specific permissions to get access?</p>
  
  <p>Below is my method:</p>
  
  <pre><code>public static Bitmap getFacebookProfilePicture(String userID) throws SocketException, SocketTimeoutException, MalformedURLException, IOException, Exception
  {
     String imageURL;
  
     Bitmap bitmap = null;
     imageURL = "http://graph.facebook.com/"+userID+"/picture?type=large";
     InputStream in = (InputStream) new URL(imageURL).getContent();
     bitmap = BitmapFactory.decodeStream(in);
  
     return bitmap;
  }
  
  Bitmap bitmap = getFacebookProfilePicture(userId);
  </code></pre>
  
  <p>I am getting null. I don't know the reason why? Any help is appreciable.</p>