Show Avatar Facebook to ImageView
<p>I used the code as follows to show up facebook avatar to ImageView </p>

<pre><code>@Override

public void onCreate(Bundle savedInstanceState) {

    super.onCreate(savedInstanceState);
    setContentView(R.layout.main); 
    ImageView img = (ImageView) findViewById(R.id.imgAvatar);
    img.setImageBitmap(getBitmapFromURL("http://graph.facebook.com/"+"100002394015528"+"/picture"));
}
public static Bitmap getBitmapFromURL(String src) {
    try {
        URL url = new URL(src);
        HttpURLConnection connection = (HttpURLConnection) url.openConnection();
        connection.setDoInput(true);
        connection.connect();
        InputStream input = connection.getInputStream();
        Bitmap myBitmap = BitmapFactory.decodeStream(input);
        return myBitmap;
    } catch (IOException e) {   
        e.printStackTrace();
        return null;
    }
}`
</code></pre>

<p>But does it not work. Please help me.</p>
