我已經申請到白名單我的應用程序,以獲取用戶權限列入白名單的Twitter登錄還是不能讓電子郵件
我使用的是相同的客戶端密鑰和客戶端祕密後,但我還是會遇到,
**TW ERROR: Error Domain=TwitterAPIErrorDomain Code=37 "Your application may not have access to email addresses or the user may not have an email address. To request access, please visit https://support.twitter.com/forms/platform." UserInfo=0x7fa3cb9e0df0 {NSLocalizedDescription=Your application may not have access to email addresses or the user may not have an email address. To request access, please visit https://support.twitter.com/forms/platform.}
這裏是我的代碼:
let twitterInstance = Twitter.sharedInstance()
twitterInstance.startWithConsumerKey(TwitterClientKey, consumerSecret: TwitterClientSecret)
twitterInstance.logInWithCompletion {
(session, error) -> Void in
if (session != nil) {
println("signed in as \(session.userName)");
if (twitterInstance.session() != nil) {
if let shareEmailViewController = TWTRShareEmailViewController(completion: {
(email: String!, error: NSError!) in
print("TW EMAIL: \(email)")
if (email != nil) {
print("TW EMAIL: \(email)")
} else {
print("TW ERROR: \(error)")
}
}) {
self.presentViewController(shareEmailViewController, animated: true, completion: nil)
}
} else {
print("User not logged in")
}
} else {
println("error: \(error.localizedDescription)");
}
}
您是否收到用戶的電子郵件ID?我也面臨同樣的問題。請幫我解決 – iWatch