【问题标题】:How can i get access token from Twitter?如何从 Twitter 获取访问令牌?
【发布时间】:2013-03-30 12:56:40
【问题描述】:

我在我的 iphone 应用程序中创建了 Titter 登录,在这里我想将我的访问令牌和密钥发送到服务器以实现自动共享功能,我无法获取我的访问令牌和密钥,请提前帮助我.

这是我的代码:

ACAccountType *twitterType = [store accountTypeWithAccountTypeIdentifier:ACAccountTypeIdentifierTwitter];
[store requestAccessToAccountsWithType:twitterType
                 withCompletionHandler:^(BOOL granted, NSError *error){

                     if(!granted){
                         NSLog(@"%@",[error localizedDescription]);
                     }
                     NSLog(@"store %@",store);
                 }];
if([[store accounts] count] > 0)
{
    NSLog(@"TWEET");
    self.hasTwitterAccountAccess = YES;
}
else
{
    NSLog(@"newlog");
    self.hasTwitterAccountAccess = NO;
}


if(self.hasTwitterAccountAccess){
    NSLog(@"login");
    // If we have twitter access, refresh the table view
    ACAccountType *twitterType = [store accountTypeWithAccountTypeIdentifier:ACAccountTypeIdentifierTwitter];
}

【问题讨论】:

    标签: iphone twitter login


    【解决方案1】:

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2014-02-17
      • 2016-02-05
      • 2012-12-29
      • 2022-11-28
      • 2012-04-28
      • 1970-01-01
      • 2012-09-16
      相关资源
      最近更新 更多