This plugin only supports media sharing as a Blob object. You can save a remote image as a Blob using the following code snippet.
fetch("url-to-image") .then(function(response) { return response.blob(); }) .then(function(blob) { // here the image is a blob });
Other plugins from Median (such as the Web Screenshot plugin) also export images as Blobs which can then be used with this plugin.
Sharing to feed
Use the following JavaScript Bridge command to share an image directly to the Instagram Feed:
median.socialShare.instagram.shareToFeed(blob);
Direct feed sharing isn’t available on iOSOn iOS, Instagram no longer supports direct sharing to the feed and presents the OS share dialog instead.
Sharing to story or reels
Share images directly to Instagram Stories or Reels. This method supports optional sticker attachments and captions.Run the following Median JavaScript Bridge command:
median.socialShare.instagram.share(blob, { attachment: stickerBlob, captionText: 'Caption for Snapchat' });