MGTwitterEngine for ipad的奇怪问题

时间:2011-09-27 08:08:37

标签: iphone objective-c ios ipad mgtwitterengine

我遇到了MGTwitterEngine for iPad的奇怪问题,因为当我在iPhone上使用它时效果很好但是当我将它用于iPad然后在下面的方法(委托方法)我得到的用户名为null但在iPhone中它是给出正确的(例如.soha00)

调用MGTwitterEngine的代码: -

-(IBAction)loginWithTwitterButtonClicked:(UIButton *)sender
  {
      _engine = [[SA_OAuthTwitterEngine alloc] initOAuthWithDelegate:self];
      _engine.consumerKey = @"PzkZj9g57ah2bcB58mD4Q";
      _engine.consumerSecret = @"OvogWpara8xybjMUDGcLklOeZSF12xnYHLE37rel2g";

      UIViewController *controller = [SA_OAuthTwitterController controllerToEnterCredentialsWithTwitterEngine: _engine delegate: self];

      if (controller) 
      {
          [self presentModalViewController: controller animated: YES];
      }

  }

以下方法是单击“授权”按钮时调用的委托方法。

- (void) OAuthTwitterController: (SA_OAuthTwitterController *) controller authenticatedWithUsername: (NSString *) username {

    NSLog(@"Authenticated with user %@", username);
}

在iPhone中,它正确显示用户名,但在iPad上它返回零。

请告诉我可能是什么问题,或者我该如何解决这个问题。 请帮我。 提前谢谢!

0 个答案:

没有答案