I am using the following code to share image to facebook but its not working.
Intent share = new Intent(Intent.ACTION_SEND);
share.setType("image/png");
share.putExtra(Intent.EXTRA_STREAM,
Uri.parse("/sdcard/img1.png"));
startActivity(Intent.createChooser(share, "Share Image"));
One, it should be in this order just for readability and sensical reasons
you need to say what the error is…
NEVER hardcode the path to the image ‘/sdcard/img1.png’ use getExternalStorageDirectory() instead