UnityNativeShare icon indicating copy to clipboard operation
UnityNativeShare copied to clipboard

Video Share on Instagram Story

Open Russel1 opened this issue 7 years ago • 11 comments

Hi,

I would like to share a video directly to the Instagram story without having to choose between "Feed" and "Story". Do you have a solution for me?

I've tried this before, but unfortunately it doesn't work:

new NativeShare().AddFile(filePath, "video/mp4").SetSubject("Subject goes here").SetText("Hello world!").SetTarget("com.instagram.android", com.instagram.share.handleractivity.CustomStoryShareHandlerActivity).Share();

Here you can find documentation about the Instagram Story Share: https://developers.facebook.com/docs/instagram/sharing-to-stories/

Thanks for help.

Russel1 avatar Nov 29 '18 16:11 Russel1

If either SetTarget("com.instagram.android", "com.instagram.share.ADD_TO_STORY") or SetTarget("com.instagram.share", "com.instagram.share.ADD_TO_STORY") doesn't work (even after removing the SetSubject and SetText functions), then I'm not sure how this can be achieved.

Also a related issue: https://github.com/yasirkula/UnityNativeShare/issues/35

yasirkula avatar Nov 29 '18 19:11 yasirkula

Unfortunately, it doesn't work :(.

Russel1 avatar Nov 30 '18 09:11 Russel1

Hi, I tried to share video under iOS but it doesn't work for me. Sharing screenshots is working well but not for videos. I'd like to know if there is a way to add a variable for the path file.

Thanks for the help.

Grayfox2017 avatar Jun 24 '19 01:06 Grayfox2017

Does File.Exists(videoPath) return true? Are there any error messages in the Xcode console?

P.S. If this is not related to Instagram Story, please open a new issue or send me a mail at [email protected]

yasirkula avatar Jun 24 '19 13:06 yasirkula

Hi! I can also confirm that sharing videos to Instagram or WhatsApp doesn't work on iOS. I don't use SetTarget, just a simple share call.

hippogamesunity avatar Dec 27 '20 22:12 hippogamesunity

What if you omit the text and subject?

yasirkula avatar Dec 28 '20 09:12 yasirkula

I'll try. BTW if I save MP4 to Files and then select it and press SHARE to Instagram, I'm getting the same error "Something went wrong". This may be related Instagram app.

hippogamesunity avatar Dec 28 '20 09:12 hippogamesunity

Is there any way to add HashTag with Image and share on Instagram? Video sharing issue resolved?

ti-hardikshah avatar Jan 11 '21 06:01 ti-hardikshah

@hippogamesunity

yasirkula avatar Jan 11 '21 07:01 yasirkula

Hi, this doesn't work. Even if I'm saving mp4 to Files than trying to share it from Files app, there is the same error. On the other hand, Instagram by itself can only pick videos from Photos, so I can't pick my file. I'll reply if I find something useful.

hippogamesunity avatar Jan 11 '21 10:01 hippogamesunity

Btw I'm using FFMPEG to encode mp4.

hippogamesunity avatar Jan 11 '21 10:01 hippogamesunity