Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android : Not able to share photos on Instagram using Intent

I am not able to share any photo on Instagram feed using Intent in Android. It opens Instagram and shows "Unable to load Photo" error and comes back to my app.

 Intent share = new Intent(Intent.ACTION_SEND);
    share.setType("image/*");
    share.putExtra(Intent.EXTRA_STREAM, uri);
    share.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
    startActivity(Intent.createChooser(share, "Share to"));

This same code was working on Instagram version 131.0.0.23.116 but it's not working on the current updated version is 134.0.0.26.121

like image 697
Amit Kumar Avatar asked Mar 24 '20 07:03

Amit Kumar


People also ask

How do you share photos on Instagram Android?

Instagram app for AndroidAt the top, tap then scroll to Post at the bottom: To upload a photo from your phone's library, select the photo you'd like to share.

What is Share intent Android?

Android uses Intents and their associated extras to allow users to share information quickly and easily, using their favorite apps. Android provides two ways for users to share data between apps: The Android Sharesheet is primarily designed for sending content outside your app and/or directly to another user.

What is also share to Feed in Instagram?

With Sharing to Feed, you can allow your app's Users to share your content to their Instagram Feed.


1 Answers

I got the same problem. It's cannot be sharing with Instagram Feed, but still working when sharing with Instagram Story and Direct. -> That probably an issue of Instagram new update version, not Android os. I try from android version >= 24(N) and got the same error

But when share from Google Photo app to Instagram Feed, still working normally

like image 147
thangit14 Avatar answered Oct 02 '22 10:10

thangit14