I am to sign in from Twitter api by iOS Application. Since I am using AFNetworking, I chose your code for it.
if (![[BDBTwitterClient sharedClient] isAuthorized])
{
dispatch_async(dispatch_get_main_queue(), ^{
[[BDBTwitterClient sharedClient] authorize];
});
}
I call the above code in action method of twitter sign in button. In the current viewController's view did load method I use:
[BDBTwitterClient createWithConsumerKey:kBDBTwitterClientOAuthConsumerKey secret:kBDBTwitterClientOAuthSecretKey];
And in app's target's info section, I have added a URL type with identifier as my bundle identifier and URL scheme of my own choice (JAWA_Twitter). I have used the same URL Scheme in your BDBTwitterClient class as: static NSString * const kBDBTwitterClientOAuthCallbackURL = @"JAWA_Twitter://authorize";
I am to sign in from Twitter api by iOS Application. Since I am using AFNetworking, I chose your code for it. if (![[BDBTwitterClient sharedClient] isAuthorized]) { dispatch_async(dispatch_get_main_queue(), ^{ [[BDBTwitterClient sharedClient] authorize]; }); }
I call the above code in action method of twitter sign in button. In the current viewController's view did load method I use: [BDBTwitterClient createWithConsumerKey:kBDBTwitterClientOAuthConsumerKey secret:kBDBTwitterClientOAuthSecretKey];
And in app's target's info section, I have added a URL type with identifier as my bundle identifier and URL scheme of my own choice (JAWA_Twitter). I have used the same URL Scheme in your BDBTwitterClient class as: static NSString * const kBDBTwitterClientOAuthCallbackURL = @"JAWA_Twitter://authorize";