I am sharing image on facebook using ACTION_SEND, but its not working .code is here
try {
File myFile = new File("/mnt/sdcard/DCIM/100MEDIA/aa.jpg");
MimeTypeMap mime = MimeTypeMap.getSingleton();
String ext = myFile.getName().substring(
myFile.getName().lastIndexOf(".") + 1);
String type = mime.getMimeTypeFromExtension(ext);
Intent sharingIntent = new Intent(
"android.intent.action.SEND");
sharingIntent.setType(type);
sharingIntent.putExtra("android.intent.extra.STREAM",
Uri.fromFile(myFile));
startActivity(Intent.createChooser(sharingIntent,
"Share using"));
} catch (Exception e) {
Toast.makeText(getBaseContext(), e.getMessage(),
Toast.LENGTH_SHORT).show();
}
but it gives the error "Cannot upload"
I am using this link ("Share Image via android app using ACTION_SEND not working")
Try this way,hope this will help you to solve your problem.