POST friendships/create fails with code 34, that page does not exist



I am having problems with following another user - POST friendships/create.
All my other requests to the twitter API 1.1 succeed except for this one, which returns;
errors = (
code = 34;
message = “Sorry, that page does not exist”;

The code snippit below shows the url I am using -
The account is valid and has been used to sign all other requests that are made.

    NSMutableDictionary *parameters = [[NSMutableDictionary alloc] init];
    NSURL *url = [NSURL URLWithString:@""];
    SLRequest *request = [SLRequest requestForServiceType:SLServiceTypeTwitter
    [parameters setObject:[tagValue stringByReplacingOccurrencesOfString:@"@" withString:@""] forKey:@"screen_name"];
    [parameters setObject:@"true" forKey:@"follow"];
    [request setAccount:self.account];
    [request performRequestWithHandler:^(NSData *responseData, NSHTTPURLResponse *urlResponse, NSError *error) {
        if (responseData != nil) {
            NSError *error = nil;
            NSDictionary *data = [NSJSONSerialization JSONObjectWithData:responseData
            if (error && [data objectForKey:@"errors"]) {
                DLog(@"Error unable to follow user %@ with user info %@.", error, error.userInfo);

I have also tried using user_id but I am given the same response.


Al Little


Are you sure the screen name or ID you’re sending belongs to an existent user?

Are you possibly sending any cookies along with your request (whether intentionally or implicitly through the HTTP framework) that may be interfering with correctly identifying the context of the request?


I’ve tried quite a few combinations.
screen_name with or without “@” and user_id.

The confusing thing is that I’m making quite a few calls which work;

friendships/create is the only one that fails (the error suggests I have the url wrong).

Apple’s Social library manages the calls and a Wireshark trace doesn’t work as the traffic is encrypted.
All I can tell is that the response from the server is code: 404, page not found.

Thanks for your help.



The horror.

See line 6 where I set up the call before setting the parameters.

All my fault but the error message threw me (404 not found).


Al little