nst / STTwitter

A stable, mature and comprehensive Objective-C library for Twitter REST API 1.1
BSD 3-Clause "New" or "Revised" License
999 stars 161 forks source link

verifyCredentialsWithSuccessBlock deprecation #198

Closed boazin closed 9 years ago

boazin commented 9 years ago

After updating STTwitter, I'm getting deprecation warning on verifyCredentialsWithSuccessBlock

When logging in, I'm using actually the same code as loginOnTheWebAction in the iOS demo.

In subsequent opens of the app I do a "silent login":

STTwitterAPI *twitter = [STTwitterAPI twitterAPIWithOAuthConsumerKey:key consumerSecret:secret
                                                                          oauthToken:oauthAccessToken oauthTokenSecret:oauthAccessTokenSecret];
                [twitter verifyCredentialsWithSuccessBlock:
                            ^(NSString *username) {
                                //user already authenticated - go on

                } errorBlock:^(NSError *error) {
                    NSLog(@"error verifying credentials: %@", error);
                    [self gotoLoginScreen];
                }];

The thing is that if I change it to verifyCredentialsWithUserSuccessBlock - the success block isn't firing - and the iOS example still says "don't forget to call verifyCredentialsWithSuccessBlock"

I'm confused...

boazin commented 9 years ago

Real issue explained better in https://github.com/nst/STTwitter/issues/199