开发者

Strange Problem with MGTwitterEngine for ipad

I am stuck with the strange problem of MGTwitterEngine for iPad because when I use it for iPhone it works perfectly but when I use it for iPad then in method below(delegate method) I am getting username as null but in iPhone it was giving correct(eg.soha00)

Code for calling MGTwitterEngine:-

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

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

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

  }

The below method is the delegate method that gets called when authorize button is clicked.

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

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

In iPhone it is showing username properly but on iPad it is returning nil.

Please suggest me what might be the problem or how could I sort this issue. Please help me. Thanks in advance!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜