yasirkula / UnityNativeShare

A Unity plugin to natively share files (images, videos, documents, etc.) and/or plain text on Android & iOS
MIT License
891 stars 131 forks source link

Video Share on Instagram Story #37

Open Russel1 opened 5 years ago

Russel1 commented 5 years ago

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.

yasirkula commented 5 years ago

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

Russel1 commented 5 years ago

Unfortunately, it doesn't work :(.

Grayfox2017 commented 5 years ago

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.

yasirkula commented 5 years ago

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 yasirkula@gmail.com

hippogamesunity commented 3 years ago

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.

yasirkula commented 3 years ago

What if you omit the text and subject?

hippogamesunity commented 3 years ago

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.

ti-hardikshah commented 3 years ago

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

yasirkula commented 3 years ago

@hippogamesunity

hippogamesunity commented 3 years ago

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 commented 3 years ago

Btw I'm using FFMPEG to encode mp4.