I was using Twitter Oath for twitter sharing, suddenly the same code is getting crashed when i tap Tweet button.
App is Crashing while twitter oath is sending update request.
here is code of sharing option
-(IBAction)ShareWithTwitter:(id)sender
{
NSLog(@"Tweet !!!");
if(!_engine)
{
_engine = [[SA_OAuthTwitterEngine alloc] initOAuthWithDelegate:self];
_engine.consumerKey =kOAuthConsumerKey;
_engine.consumerSecret = kOAuthConsumerSecret;
}
else
{
_engine = [[SA_OAuthTwitterEngine alloc] initOAuthWithDelegate:self];
_engine.consumerKey =kOAuthConsumerKey;
_engine.consumerSecret = kOAuthConsumerSecret;
}
UIViewController *controller = [SA_OAuthTwitterController controllerToEnterCredentialsWithTwitterEngine:_engine delegate:self];
if (controller)
{
[self presentModalViewController: controller animated: YES];
}
}
And this code is for Tweet !! (where app is crashing).
-(IBAction)updateTwitter:(id)sender
{
activityIndicatorView.hidden=NO;
activityIndicatorView.activityIndicatorViewStyle = UIActivityIndicatorViewStyleGray;
[activityIndicatorView startAnimating];
[tweetTextField resignFirstResponder];
NSString *strToPostOnTwitter = @"Hello Happy New Year to All !!!";
NSLog(@"String to Post is : %@",strToPostOnTwitter);
//Twitter Integration Code Goes Here
[_engine sendUpdate:strToPostOnTwitter];
//btnTwitter.hidden = YES;
}