I am trying to deep link from my app to a user's twitter profile on the native twitter app. I have added schema rules for twitter and the following code:
application.open( URL(string:"twitter://user?screen_name=BarackObama", options[:], completionHandler:{(success) in
print("Success")
})
I can successfully open the twitter app and see the console print "Success" but my own twitter feed is what I see, not the user's twitter page. Is this url schema still valid?
Thanks
OK, there are two easy steps to achieve this in Swift 4:
First, you have to modify Info.plist to list instagram and facebook with LSApplicationQueriesSchemes. Simply open Info.plist as a Source Code, and paste this:
After that, you can open twitter apps. Here is a complete code for twitter you can link this code to any button you have as an Action:
Use this for twitter profile share, Swift 4: