We are building an app similar to Tiktok and we want the user to be able to share videos on Twitter without using their API. Ideally, we would like to open the app with the embedded text and video for adding some versatility for the user in case they want to edit the tweet before posting it.
Assuming the user has Twitter installed, I am able to tweet some 'text', URLs or even hashtags via SLComposeViewController or by opening the appURL for posting a tweet (twitter://). The challenge is that I am not able to embed the local video.
I think this behavior might be feasible as Apple UIActivityViewController does exactly this: when you go to photos, you select a video > Share on Twitter > It opens the app with the video embedded in the tweet, ready to be tweeted.
This is my current code:
let tweetController = SLComposeViewController(forServiceType: SLServiceTypeTwitter)
tweetController?.setInitialText(self.text)
tweetController?.add(URL(string: "https://my-video-url"))
Any help would be valuable, Many thanks.