2017-09-25 64 views
0

我在我的iOS项目中使用登录Twitter。我已经完成了所有需要设置的事情。但我不能得到user_email。我已经在twitter App上检查了“请求电子邮件给用户”。但仍然有错误。Twitter user_email请求

这里的错误信息

Request failed: unauthorized (401) 

而且继承人可以编码

TWTRAPIClient *client = [TWTRAPIClient clientWithCurrentUser]; 
      [client requestEmailForCurrentUser:^(NSString *email, NSError *error) { 
       if (email) { 
        NSLog(@"signed in as %@", email); 
       } else { 
        NSLog(@"error: %@", [error localizedDescription]); 
       } 

      }]; 

我希望你能帮助我在此。谢谢!

+1

检查您的授权密钥和秘密。他们有什么问题.. –

回答

0

我有同样的问题。 TWTRAPIClient在会话存储中有两个TWTRSession。重新安装应用。这将解决问题。