Actually I want to share image in Instagram through intent.
I found this solution for images saved on SD card but I want to do same for image on site (link).
I tried with
Intent shareIntent = new Intent(android.content.Intent.ACTION_SEND);
shareIntent.setType("image/*");
shareIntent
.putExtra(
Intent.EXTRA_STREAM,
Uri.parse("http://www.alliswell.biz/images/products/art/alliswell_signs/yellowB.jpg"));
shareIntent.setPackage("com.instagram.android");
startActivity(shareIntent);
But it's not working.
When I start above intent it opens my installed Instagram application and it immediately finish Instagram and toast message comes "unable to download file"
Actually it does not parse link and image respectively. What should be issue?
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.
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.
With Sharing to Feed, you can allow your app's Users to share your content to their Instagram Feed.
You should use local path to file
For example: "file:///path/to/file/image.png".
Note, that it is very important to include "file" in the path, without this part it also can show the same toast.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With