Android Question Does Anyone Have A Code Snippet For Posting Video To Instagram

Randy Younger

Member
Licensed User
I have tried the FileProviderExample and I can't get an image or a video to bring up the Instagram share with the content (mp4) loaded. I can launch the Instagram app no problem, but it does not go to the screen where the content (my mp4 video) is pre-loaded and ready to share. I can do this in iOS with Swift very easily, but there doesn't seem to be a working example for b4a. Anyone have luck with this?
 

Randy Younger

Member
Licensed User
Thank you Erel. It looks like I figured it out. At least I found one way to do it. You have to save the video to File.DirExternal, otherwise Instagram won't pick up the file in the "android.intent.extra.STREAM". Also, it requires "content://" instead of "file://" in the uri. I tried many times in every way possible with the FileProvider approach, and Instagram never recognized, or allowed the extra.STREAM info in.


This works:
Dim u As Uri
u.Parse("content://" & File.Combine(File.DirRootExternal, FileName))
intn.putExtra("android.intent.extra.STREAM", u)
 
Upvote 0
Top