Q:

how to fix error 403 when update new tweet to twitter using xcode?

Request DBE044D8-3C3D-4122-95FF-F0E2063FB9DF failed with error: Error Domain=HTTP Code=403 "The operation couldn’t be completed. (HTTP error 403.)"

that error log is showed like that when I want to update new tweet, I am using this code
- (void) requestSucceeded: (NSString *) requestIdentifier {  
    CLog(@"Request %@ succeeded", requestIdentifier);  
}  

- (void) requestFailed: (NSString *) requestIdentifier withError: (NSError *) error {  
    CLog(@"Request %@ failed with error: %@", requestIdentifier, error);  
}

-(void)twit:(NSString *)text{
    CLog(@"test to tweet");
    [_engine sendUpdate:@"hallo"];
}

- (IBAction)twitter:(id)sender {
    NSString * user=[[NSUserDefaults standardUserDefaults] objectForKey:@"username"]; 
    if(![user isNotEmpty]){
        _engine=nil;
    }

    if(!_engine){
        CLog(@"engine create");
        _engine = [[[SA_OAuthTwitterEngine alloc] initOAuthWithDelegate:self] autorelease];
        _engine.consumerKey= kOAuthConsumerKey;  
        _engine.consumerSecret = kOAuthConsumerSecret;  
    } 

    if(![_engine isAuthorized]){  
        UIViewController *controller = [SA_OAuthTwitterController controllerToEnterCredentialsWithTwitterEngine:_engine delegate:self];  

        if (controller){  
            [self presentModalViewController:controller animated:YES];
            [[BNUtilitiesQuick FrontPageofBadger] presentModalViewController:controller animated:YES];
        }  
    }  
}

#pragma mark SA_OAuthTwitterEngineDelegate  
- (void) storeCachedTwitterOAuthData:(NSString *) data forUsername:(NSString *) username {  
    NSUserDefaults          *defaults = [NSUserDefaults standardUserDefaults];  

    [defaults setObject:data forKey:@"authData"];
    [defaults setObject:username forKey:@"username"];

    [defaults synchronize];
    CLog(@"username:%@", username);
}  

- (NSString *) cachedTwitterOAuthDataForUsername:(NSString *) username {
    return [[NSUserDefaults standardUserDefaults] objectForKey:@"authData"];
}

- (void) OAuthTwitterControllerFailed:(SA_OAuthTwitterController *) controller{
    CLog(@"failed");
}
- (void) OAuthTwitterControllerCanceled:(SA_OAuthTwitterController *) controller{
    CLog(@"cancel");
}

anyone get that error too? and how to fix this problem?

A:

I think this problem occur because your twitter API may be deprecated also closed by twitter....
use latest twitter API or also inBuilt Twitter Framework which work in iOS 5 or Later.
its very useful and also very easy..
:)

