Documentation

Instagram Share Kit

Share images and videos from Unity to the Instagram feed and Stories on Android and iOS, with no SDK and no manual setup.

  • Version 2.0.0
  • Unity 6000.0+
  • Platforms Android, iOS
  • Updated Nov 4, 2026
Instagram Share Kit

Overview

Instagram Share Kit shares images and videos from your Unity game to Instagram on Android and iOS: to the feed (and Reels or messages, the player picks) and to Stories, with stickers and gradient backgrounds. One static C# class does it. There is no Instagram SDK to install, no login and nothing to add to your manifest, Gradle files or Info.plist.

The kit shares files you already have: a screenshot, a recording, a picture made by the player. It does not capture screenshots or record video itself (Unity's ScreenCapture does the first; see Share a screenshot).

Requirements

ItemVersionNotes
Unity6000.0+Android and/or iOS build support installed
com.unity.ugui2.0+The demo's UI only
Instagram appcurrentInstalled on the player's device. Without it, the share calls do nothing and IsInstagramInstalled() returns false.
Facebook App IDFrom developers.facebook.com. Meta requires it for Stories; feed sharing works without it.

Quick start

  1. Import the package The plugin lands in Assets/hardartcore/Instagram Share and the demo media in Assets/StreamingAssets/InstagramShare.
  2. Set your App ID Once, before the first Story: InstagramShareHelper.FacebookAppId = "1234567890";
  3. Save a file Write the image or video to Application.persistentDataPath or Application.temporaryCachePath.
  4. Share it Call one of the share methods with the file's absolute path. Build to an Android or iOS device with Instagram installed.
ShareButton.cs
using Hardartcore.InstagramShare;
using UnityEngine;

public class ShareButton : MonoBehaviour
{
    private void Awake()
    {
        InstagramShareHelper.FacebookAppId = "1234567890";
    }

    public void Share()
    {
        var path = Application.persistentDataPath + "/score.png";
        if (InstagramShareHelper.IsInstagramInstalled())
        {
            InstagramShareHelper.ShareImageAsInstagramStory(path);
        }
    }
}
In the Editor

Every call is a safe no-op in the Editor and on other platforms, and IsInstagramInstalled() returns false there. Test sharing on a device.

The demo

Open Demo/Scene/DemoScene. It copies the sample image.jpg, sticker.png and video.mp4 out of StreamingAssets/InstagramShare into Application.persistentDataPath (Instagram needs real files), shows the image and sticker in a story preview, and has one button per share call. Set your Facebook App ID on the Demo object's DemoScript before building. The status chip shows whether Instagram is installed; without it the buttons are disabled on a device. The layout adapts to portrait and landscape.

Share a screenshot

ShareScreenshot.cs
public IEnumerator ShareScreenshot()
{
    yield return new WaitForEndOfFrame();
    var texture = ScreenCapture.CaptureScreenshotAsTexture();
    var path = Path.Combine(Application.temporaryCachePath, "screenshot.png");
    File.WriteAllBytes(path, texture.EncodeToPNG());
    Destroy(texture);

    InstagramShareHelper.ShareImageAsInstagramStory(path);
}

API reference

Everything is on the static class Hardartcore.InstagramShare.InstagramShareHelper. Paths are absolute file paths. Colours are hex strings such as "#02937B".

FacebookAppId
string. Your Facebook App ID. Meta requires it for Stories.
IsInstagramInstalled()
bool. True when Instagram is on the device. Share calls do nothing without it.
ShareImageToInstagram(path)
An image (JPEG, PNG or GIF) to Instagram. Android: Instagram's share screen, where the player picks feed, Reels or a message. iOS: the system share sheet, where the player picks Instagram.
ShareVideoToInstagram(path)
A video (MP4 or MKV, 3 seconds to 10 minutes, at least 640×640), the same way.
ShareImageAsInstagramStory(path, attributionLink = null)
An image as the Story background.
ShareVideoAsInstagramStory(path, attributionLink = null)
A video as the Story background.
ShareImageWithGradientAsInstagramStory(sticker, topColor, bottomColor, attributionLink = null)
A sticker on a two-colour gradient. The same colour twice gives a solid background.
ShareBackgroundImageAndStickerAsInstagramStory(image, sticker, attributionLink = null)
An image background with a sticker on top, which the player can move and resize.
SetFileProvider(suffix)
Android Not needed: the plugin has its own provider. Use it only to share through a FileProvider you declared yourself, passing its authority suffix with a leading dot.
CopyFile(name)
Android Copies StreamingAssets/name to the app-specific external files folder. The demo shows a cross-platform way with UnityWebRequest.
attributionLink

Android only, and Instagram only shows it for apps Meta has approved. iOS ignores it.

Media specs

Meta's recommendations for Stories, from its Sharing to Stories guide:

AssetFormatsRecommended
Story imageJPG, PNG9:16
Story videoH.264, H.265, WebMAt least 720×1280, 9:16, up to 20 seconds
StickerJPG, PNG640×480, transparent PNG for a cut-out look

How it works

Android

Story calls send Instagram's com.instagram.share.ADD_TO_STORY intent with your App ID as source_application; feed calls send an ACTION_SEND intent to Instagram. File paths become content:// URIs through the plugin's FileProvider, and Instagram is granted read access to them. The Android library Plugins/Android/InstagramShare.androidlib adds to your build:

FileProvider
com.hardartcore.instagram.InstagramFileProvider with the authority <your application id>.hardartcore.instagram. Its own class name, so it never clashes with another plugin's or your own FileProvider.
Shared folders
External storage, the app's files folder and cache folder: Application.persistentDataPath and Application.temporaryCachePath work whether they are external or internal. No storage permission is needed.
Queries
<queries><package android:name="com.instagram.android"/></queries>, so Android 11+ lets the app see Instagram.
Dependency
androidx.core:core:1.9.0 in the library's build.gradle, downloaded by Gradle from Google's Maven repository.
ProGuard
proguard-rules.pro keeps com.hardartcore.instagram.**, which C# calls by name, when you enable minification.

iOS

Story calls put your file data on the pasteboard under Instagram's com.instagram.sharedSticker.* keys (expiring after five minutes) and open instagram-stories://share?source_application=<App ID>. iOS has no official direct route to the Instagram feed, so feed calls open the system share sheet with the file and the player picks Instagram there.

Scripts/Editor/InstagramShareIOSPostProcess.cs adds to Info.plist after every iOS build: instagram and instagram-stories in LSApplicationQueriesSchemes, and a NSPhotoLibraryAddUsageDescription text (kept if you already have one), because the share sheet offers "Save Image" and iOS closes apps that save to Photos without one.

Folder layout

Assets/
├── hardartcore/Instagram Share/
│   ├── Documentation.html                 this documentation
│   ├── Scripts/
│   │   ├── InstagramShareHelper.cs        the C# API
│   │   └── Editor/                        Info.plist build step, Help menu items
│   ├── Plugins/
│   │   ├── Android/InstagramShare.androidlib/
│   │   │   ├── build.gradle               androidx.core dependency, ProGuard rules
│   │   │   └── src/main/                  manifest, Java helper and FileProvider, shared paths
│   │   └── iOS/InstagramShare.mm          pasteboard, URL scheme and share sheet bridge
│   └── Demo/                              DemoScene, its scripts, Nunito font, icons
└── StreamingAssets/InstagramShare/        the demo's image, sticker and video

The demo and StreamingAssets/InstagramShare can be deleted; the plugin does not use them.

Upgrading from 1.x

  1. Delete the old library Remove Plugins/Android/instagram-share-release.aar and Editor/InstagramShareAndroidDependencies.xml if they are still in the project: importing an update does not delete files.
  2. Remove the old provider Delete the <provider> you added to Assets/Plugins/Android/AndroidManifest.xml for this asset (the one pointing at @xml/file_paths), or the build fails with a missing resource. The <queries> entry and READ_EXTERNAL_STORAGE are no longer needed either.
  3. Set your App ID Add InstagramShareHelper.FacebookAppId = "...";: Meta requires it for Stories, and Instagram shows an error without it.
  4. Drop SetFileProvider Remove SetFileProvider(...) calls, unless you keep sharing through your own provider.

Troubleshooting

Nothing happens on share
Instagram is not installed (check IsInstagramInstalled()), or the file does not exist.
Instagram shows an error for Stories
The Facebook App ID is empty or wrong.
Failed to find configured root
Android: the file is outside the shared folders. Save it under Application.persistentDataPath or Application.temporaryCachePath.
Duplicate class androidx.core...
Another plugin copied androidx.core AAR files into Assets/Plugins/Android (External Dependency Manager without Gradle templates). Turn on EDM's Patch mainTemplate.gradle option and resolve again.
Resource xml/file_paths not found
The provider added for version 1.x is still in your manifest. See Upgrading.
IsInstagramInstalled() is false on iOS
Another build step replaced Info.plist after this one. Check that LSApplicationQueriesSchemes lists instagram and instagram-stories.

Third-party notices

The demo includes two third-party components. Everything else in the package is original work by HardArtcore. Instagram is a trademark of Meta Platforms, Inc.; this package is not affiliated with or endorsed by Meta.

ComponentLocationLicense
Nunito font
Copyright 2014 The Nunito Project Authors (github.com/googlefonts/nunito)
Demo/UI/Fonts/SIL Open Font License 1.1
Material Symbols icons
Copyright Google LLC (github.com/google/material-design-icons)
Demo/UI/Icons/Apache License 2.0

The full licence texts ship in the package's Documentation.html, and online: SIL Open Font License 1.1, Apache License 2.0.

Release notes

2.0.0

  • iOS support: Stories through Instagram's pasteboard API, feed sharing through the share sheet, the Info.plist entries added on build.
  • Stories send your Facebook App ID (InstagramShareHelper.FacebookAppId), which Meta requires.
  • Zero setup on Android: an Android library with its own FileProvider, the Instagram <queries> entry, the androidx.core dependency and ProGuard rules. No AAR, no manifest edits, no Gradle templates, no External Dependency Manager.
  • A new demo in portrait and landscape with a story preview; its media now ships in StreamingAssets.
  • Unity 6 or newer.

1.3

  • InstagramShareHelper is a static class: no need to add it to a scene.

1.2

  • Option to set a custom file provider suffix.

Need help?

Questions, bug reports or feature requests: I usually reply within a day.

support@hardartcore.com

Last updated November 4, 2026.