Reputation: 443
I'm using React Native to create an iOS app. However i would like to share a uri to an S3 video as follows:
import React from 'react'
import { Share, Linking ....} from 'react-native'
//button and run function
testShareInsta = async () => {
const uri = "https://s3-dev.s3-us-west-1.amazonaws.com/video/myvideo";
let encodedURL = encodeURIComponent(uri);
let instagramURL = 'instagram://library?AssetPath=${encodedURL}';
return Linking.openURL(instagramURL);
}
What can i do to make this work?
Upvotes: 2
Views: 10116
Reputation: 147
import Share from 'react-native-share';
const options = {
title: 'XYZ',
message:"HELLO",
social: Share.Social.INSTAGRAM,
};
const shareResponse = await Share.shareSingle(options);
Upvotes: 0
Reputation: 4162
Upvotes: 1