1

Messenger and facebook app cannot process my image when i try to share.

Here is my method:

private void shareIt()
{
    Intent intent=new Intent(android.content.Intent.ACTION_SEND);
    intent.setType("image/*");
    intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET);
    if(mImageUri == null) {
        Toast.makeText(this, "Choose a photo first", Toast.LENGTH_LONG).show();
    }
    else
    {
        intent.putExtra(Intent.EXTRA_STREAM , mImageUri);
        startActivity(Intent.createChooser(intent, "Share Image via..."));
    }
}

Could not solve this issue based on others solutions. Any idea how to get it working?

mImageUri contains the image when is selected from gallery.

user3411961
  • 125
  • 1
  • 8
  • Please explain, in detail, what "cannot process my image" means. Also, please explain, in detail, what "mImageUri contains the image when is selected from gallery" means. – CommonsWare Dec 26 '15 at 19:00
  • @CommonsWare "cannot process my image" i meant that when i try to share an image on messenger app it give me an error message that: > messenger was unable to process the file and when i try to share the image on facebook app i get the error: > could not load the image "mImageUri" holds the uri of the image i want to share when selected from gallery is it ok? – user3411961 Dec 26 '15 at 19:12
  • Refer to this post, [link](http://stackoverflow.com/questions/34618514/share-text-via-intent-on-facebook-without-using-facebook-sdk/35152808#35152808) – Karthik Kumar Feb 08 '16 at 07:09

0 Answers0