实现TWTRShareEmailViewController时出现错误警告

时间:2015-12-16 14:08:35

标签: ios swift email twitter twitter-fabric

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用户的电子邮件。有人可以帮忙吗?

0 个答案:

没有答案