如何打开新浪微博用户档案?
How to open a Sina Weibo user profile?
我们可以通过以下方式打开 Twitter 应用程序并定向到 Twitter 用户个人资料:
let a = URL(string: "twitter://user?screen_name=BarackObama")
UIApplication.shared.open(a, options: [ : ], completionHandler: nil)
现在我想打开新浪微博应用程序并转到新浪微博用户个人资料。我该怎么办?
我不想用网页浏览器的方式,因为人们通常不会在他们的网页浏览器中登录推特或新浪微博。
我找到了答案:
let a = URL(string: "sinaweibo://userinfo?uid=12345678")!
UIApplication.shard.open(a, options: [ : ], comletionHandler: nil)
就是这样。
我们可以通过以下方式打开 Twitter 应用程序并定向到 Twitter 用户个人资料:
let a = URL(string: "twitter://user?screen_name=BarackObama")
UIApplication.shared.open(a, options: [ : ], completionHandler: nil)
现在我想打开新浪微博应用程序并转到新浪微博用户个人资料。我该怎么办?
我不想用网页浏览器的方式,因为人们通常不会在他们的网页浏览器中登录推特或新浪微博。
我找到了答案:
let a = URL(string: "sinaweibo://userinfo?uid=12345678")!
UIApplication.shard.open(a, options: [ : ], comletionHandler: nil)
就是这样。