Twitterkit present a new viewcontroller instead present on a target viewController

140 views Asked by At

Im using TwiterKit 3.0 framwork. And im using Deeplink to share a tweet for my application. But the problem is its presenting a new viewController and shows the twitter dialogue box. But my requirement is need to share like in Photos app sharing screen.

if let deepLinkurl = branchObject.getShortUrl(with: shareLinkProperties) {

            let composer = TWTRComposer()
            composer.setURL(URL(string: deepLinkURL))

            composer.show(from: self) { result in
                if (result == TWTRComposerResult.cancelled) {
                    print("Tweet composition cancelled")
}
}

If i run above code I get like this twitterShareImage1

But I need something like this. shareImage2

1

There are 1 answers

2
Amruta Deshmukh On

You can use Branch's showShareSheet() method for sharing Branch links to other apps. Here is how the link is shared when using the shareSheet and selecting Twitter from the list of the Apps.

Branch Share Sheet

You can check out the documentation here