-1

Some time I am getting the error message OAuth Authentication faileed while I am trying to login/share the date to Twitter using sharekit.Can any one help why I am getting this error?

#define SHKTwitterUseXAuth 0 is set in SHKConfig.h file

User97693321
  • 3,336
  • 7
  • 45
  • 69
  • go through the link may be helpful for OAuth failed issue [oauthfailed](http://hostmonsterforums.com/showthread.php?9502-OAuth-Authentication-Failed) –  Oct 22 '11 at 14:03

1 Answers1

4

Some times this authentication failed error message is coming due to c change in twitter APIs and may be not updated in Sharekit. Please verify in SHKTwitter.m that in init method the authorizeURL ,requestURL and accessURL should be like below,i.e add api before twitter.

self.authorizeURL = [NSURL URLWithString:@"https://api.twitter.com/oauth/authorize"];
self.requestURL = [NSURL URLWithString:@"https://api.twitter.com/oauth/request_token"];
self.accessURL = [NSURL URLWithString:@"https://api.twitter.com/oauth/access_token"];

and in sendStatus method verify https should be there as below

OAMutableURLRequest *oRequest = [[OAMutableURLRequest alloc] initWithURL:[NSURL URLWithString:@"https://api.twitter.com/1/statuses/update.json"]
                                                                   consumer:consumer
                                                                      token:accessToken
                                                                      realm:nil
                                                          signatureProvider:nil];