[英]Twit to twitter using MGTwitterEngine not Working
I have to integrate Twitter API in iPhone(4.2 and above).For this I am using SA_OAuthTwitterEngine + MGTwitterEngine classes. 我必须在iPhone(4.2及更高版本)中集成Twitter API。为此,我正在使用SA_OAuthTwitterEngine + MGTwitterEngine类。
I register applicaiton to www.twitter.com/apps and pass Consumer key and Consumer secret to controller my code is this. 我在www.twitter.com/apps上注册了应用程序,并通过Consumer Key和Consumer Secret来控制我的代码。
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];
}
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? 在两个示例中,我们都无法显示。.在两个示例中,我都遇到错误:
failed with error: Error Domain=HTTP Code=401 "The operation couldn't be completed. (HTTP error 401.)”
可以请任何人给我建议,如何克服这个问题?
There are changes for API, I guess the MGTwitterEngine is not updated and please do refer the developer site for more information. API有所更改,我想MGTwitterEngine尚未更新,请参阅开发者网站以获取更多信息。
http://www.readwriteweb.com/archives/twitter_changes_api_fails_to_notify_developers.php http://www.readwriteweb.com/archives/twitter_changes_api_fails_to_notify_developers.php
[_engine sendUpdate: [NSString stringWithFormat: @"Already Updated. \n%@", [NSDate date]]];
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.