Cross Platform Instagram Kit
  • Introduction
  • Usage
    • Namespace
  • Api
    • Is Service Available
    • Image Sharing
    • Video Sharing
    • Add Stickers & Links
  • Utility Snippets
    • Save Texture2D to Persistent Path
    • Save Video to Persistent Path
Powered by GitBook
On this page

Was this helpful?

  1. Api

Video Sharing

Learn how to share a video

For sharing a video, you need to pass the path of the video to StoryContent instance

StoryContent content = new StoryContent ("PATH_TO_VIDEO_FILE", true);

Passing true to StoryContent instance indicates the file passed is a video

Share the StoryContent on Instagram

InstagramKitManager.Share(content, OnShareComplete); //OnShareComplete is callback method

Video passed can be of H.264 or H.265 or WebM formats.

Example

using VoxelBusters.InstagramKit;

void ShareImage(string filePath)
{
    // Create Story Content Instance
    StoryContent content = new StoryContent(filePath, true);
    
    // Share
    InstagramKitManager.Share(content, OnShareComplete);
}

private void OnShareComplete(bool success, string error)
{
	string message  =  success ? "Successfully Shared" : "Failed to share " + error;
	Debug.Log(message);
}
PreviousImage SharingNextAdd Stickers & Links

Last updated 6 years ago

Was this helpful?