Reputation: 88
We can open Twitter app and direct to a Twitter user profile by:
let a = URL(string: "twitter://user?screen_name=BarackObama")
UIApplication.shared.open(a, options: [ : ], completionHandler: nil)
Now I want to open Sina Weibo app and direct to a Sina Weibo user profile. How can I do?
I don't want to use web browser method, because people normally do not login Twitter or Sina Weibo in their web browser.
Upvotes: 0
Views: 393
Reputation: 88
I have found the answer:
let a = URL(string: "sinaweibo://userinfo?uid=12345678")!
UIApplication.shard.open(a, options: [ : ], comletionHandler: nil)
That's it.
Upvotes: 0