if (Twitter.sharedInstance().session() != nil) {
if let shareEmailViewController = TWTRShareEmailViewController(completion: {
(email: String!, error: NSError!) in
if (email != nil) {
print("\(email)")
} else {
print("\(error)")
}
}) {
self.presentViewController(shareEmailViewController, animated: true, completion: nil)
}
} else {
print("User not logged in")
}
当我使用上述代码块时,我收到以下错误警告Cannot convert value of type '(String!, NSError!) -> ()' to expected argument type 'TWTRShareEmailCompletion?'
?
我试图通过上面的代码块访问Twitter用户的电子邮件。有人可以帮忙吗?