2
self.twitter = [STTwitterAPI twitterAPIWithOAuthConsumerKey:@"myConsumerKey"
                                                     consumerSecret:@"myConsumerSecret"];

        [self.twitter postTokenRequest:^(NSURL *url, NSString *oauthToken) {
            NSLog(@"-- url: %@", url);
            NSLog(@"-- oauthToken: %@", oauthToken);

        } authenticateInsteadOfAuthorize:NO
                        forceLogin:@(YES)
                        screenName:nil
                     oauthCallback:@"myapp://twitter_access_tokens/"
                        errorBlock:^(NSError *error) {
                            NSLog(@"-- error: %@", error);
                        }];

Above code is working fine for iOS7, but in iOS8 getting error:- Error Domain=STHTTPRequest Code=401 "HTTP Status 401: Unauthorized"

abhinav
  • 312
  • 1
  • 11
  • 1
    Please make sure that in your developer's app settings, your call back URL field is not empty and Login in with twitter is True. Write any URL there and see if it works? – Shahid Iqbal Dec 04 '14 at 21:02

0 Answers0