用MGTwitterEngine到Twitter的twit无法正

用MGTwitterEngine到Twitter的twit无法正

本文介绍了使用MGTwitterEngine到Twitter的twit无法正常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我必须在iPhone(4.2及更高版本)中集成Twitter API.为此,我正在使用SA_OAuthTwitterEngine + MGTwitterEngine类.

I have to integrate Twitter API in iPhone(4.2 and above).For this I am using SA_OAuthTwitterEngine + MGTwitterEngine classes.

我在www.twitter.com/apps上注册了应用程序,并通过Consumer Key和Consumer Secret来控制我的代码.

I register applicaiton to www.twitter.com/apps and pass Consumer key and Consumer secret to controller my code is this.

if(!_engine){
    _engine = [[SA_OAuthTwitterEngine alloc] initOAuthWithDelegate:self];
    _engine.consumerKey    = KCONSKEY;
    _engine.consumerSecret = KCONSECKEY;
}

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

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

我看过示例也是如此.在这两个示例中,我们都无法抽动.此外,在两个示例中,我都遇到了错误: failed with error: Error Domain=HTTP Code=401 "The operation couldn’t be completed. (HTTP error 401.)可以请任何人给我建议如何解决这个问题吗?

I have seen this and this example also. In both example we can’t able to twit.. Also, in both example, I ‘m getting error: failed with error: Error Domain=HTTP Code=401 "The operation couldn’t be completed. (HTTP error 401.)"Can Please, any one give me suggestion how to overcome this problem?

推荐答案

API有所更改,我想MGTwitterEngine尚未更新,请参阅开发者网站以获取更多信息.

There are changes for API, I guess the MGTwitterEngine is not updated and please do refer the developer site for more information.

http://www.readwriteweb.com/archives/twitter_changes_api_fails_to_notify_developers.php

https://dev.twitter.com/docs

这篇关于使用MGTwitterEngine到Twitter的twit无法正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-01 04:08