-
-
Save michaeltys/a8613e5aea9db8e4684bf85568e40160 to your computer and use it in GitHub Desktop.
Hi @michaeltys, i had same issue with @NALAndrod2
@NALAndrod2 did you find a solution ? I have been searching for this 5 days.
@ysnklcky, Not yet :(. It works normally on android below N with Uri.parse(file.absolutePath). I'm still I am still researching. The document of Instagram developer seems to be too old
Same problem --> https://stackoverflow.com/questions/60826717/android-not-able-to-share-photos-on-instagram-using-intent
Same problem --> https://stackoverflow.com/questions/60786976/share-intent-issue-in-instagram-feed
Same problem --> https://github.com/esysberlin/esys-flutter-share/issues/57
But still no solution. Could you please update, if you found solution.
As this link https://stackoverflow.com/questions/60826717/android-not-able-to-share-photos-on-instagram-using-intent/60832792#60832792.
I guess this issue belongs to Instagram and android 10
Hello guys, any news? I trying to fix this issue from the last week :/
Workaround solution to fix temporary this IG bug (I think is a bug from the Instagram app)
https://stackoverflow.com/questions/60776730/instagram-android-share-intent-unable-to-load-image
Hello,I want to click a picture and post it on instagram using app I have made + I want to include Hastags
You can try this. It worked for me. Directly Instagram story.
private void shareInstagram(Uri uri) {
Intent feedIntent = new Intent(Intent.ACTION_SEND);
feedIntent.setType("image/*");
feedIntent.putExtra(Intent.EXTRA_STREAM, uri);
feedIntent.setPackage(Contracts.INSTAGRAM_PACKAGE_NAME);
Intent storiesIntent = new Intent(Contracts.INSTAGRAM_STORY_ACTION_NAME);
storiesIntent.setDataAndType(uri, "image/*");
storiesIntent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
storiesIntent.setPackage(Contracts.INSTAGRAM_PACKAGE_NAME);
this.grantUriPermission(
Contracts.INSTAGRAM_PACKAGE_NAME, uri, Intent.FLAG_GRANT_READ_URI_PERMISSION);
feedIntent.putExtra(Intent.EXTRA_INITIAL_INTENTS, new Intent[]{storiesIntent});
startActivity(feedIntent);
}
Hey @gokmenbayram ........could you please tell me what you actually passed when you call this method ????
@michaeltys, could you please tell me where and how you call your method?? What you pass on the call of this method????
Hey @gokmenbayram ........could you please tell me what you actually passed when you call this method ????
i didnt understand this comment.
Hey @gokmenbayram ...i meant that I understood your shareInstagram(Uri uri method ) but I want to know what you actually passed as uri while calling this method???? Please do let me know..
with provider.
public Uri getImageUri() {
File directory = new File(Files.statisticsSSPath());
File file = new File(directory, 0 + ".png");
return FileProvider.getUriForFile(Application.context(), Application.context().getPackageName() +".provider",file);
}
Is there a way to get a callback that post/story shared successfully?
Is there any way around for react native/expo ?
Hi @michaeltys, I got a problem when sharing a photo on Instagram.
I using FileProvider.getUriForFile, but this only works when sharing "Direct" or "Story". When sharing on Feed, Instagram app got an error and don't file my file.
Could you please help me, please