Hi,
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 - https://api.twitter.com/1.1/friendships/create.json.
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:@"https://api.twitter.com/1.1/friendships/create.json"];
SLRequest *request = [SLRequest requestForServiceType:SLServiceTypeTwitter
requestMethod:SLRequestMethodPOST
URL:url
parameters:nil];
[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
options:NSJSONReadingMutableLeaves
error:&error];
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.
Thanks,
Al Little