I have to integrate Twitter API in iPhone(4.2 and above).For this I am using SA_OAuthTwitterEngine + MGTwitterEngine classes.
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];
}
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?
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