iPad 版 MGTwitterEngine 的奇怪问题
我遇到了 iPad 版 MGTwitterEngine 的奇怪问题,因为当我将它用于 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 上,它返回 nil。
请建议我可能存在什么问题,或者如何解决此问题。 请帮我。 提前致谢!
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] 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!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论