display image from resource folder on facebook wall in android
<p>I am trying to post an image from my Resource folder onto facebook wall. everything is working perfectly. If i use a URL of an image, it gets posted on my facebook wall. What i want to know is how do i ost an image from my resource folder to facebook wall. here is a snippet of my code. any help will be greatly appreciated.</p>

<pre><code>Bundle params = new Bundle();
    Context ctx = null;
    @SuppressWarnings("null")
    Bitmap bitmap = BitmapFactory.decodeResource(ctx.getResources(),R.drawable.bestbuy_deal);
    ByteArrayOutputStream stream = new ByteArrayOutputStream();
    bitmap.compress(Bitmap.CompressFormat.JPEG, 100, stream);
    byte[] bitMapData = stream.toByteArray();
    params.putString("name","ICE App");
    params.putString("caption", "Bestbuy Deal for SONY Action Cam");
    params.putString("description", "Checkout SONY ICE For exciting deals!!");
    params.putString("link", "http://www.sony.com");
    params.putByteArray("picture", bitMapData);
//  params.putString("picture", "R.drawable.sony");

    facebook.dialog(this, "me/feed",params, new DialogListener()
</code></pre>
