I have some problem to implement the method isUser:receivingUpdatesFor: from the MGTwitterEngine in order to check if a user is following another user on Twitter. Here is my code :
//Here is how I call the method (isRequestIdentifier is an NSString declare in the .h)
isRequestIdentifier = [[twitterEngine isUser:user1 receivingUpdatesFor:user2] retain];
NSLog(@"user1 : %@ - user2 : %@", user1, user2);
NSLog(@"isRequestIdentifier : %@",isRequestIdentifier);
#pragma mark TwitterEngineDelegate
- (void) requestSucceeded: (NSString *) requestIdentifier {
if ([requestIdentifier isEqualToString:isRequestIdentifier]) {
NSLog(@"Request isRequestIdentifier %@ succeeded", requestIdentifier);
}
}
- (void) requestFailed: (NSString *) requestIdentifier withError: (NSError *) error {
if ([requestIdentifier isEqualToString:isRequestIdentifier]) {
NSLog(@"Request isRequestIdentifier : %@ failed with error: %@", requestIdentifier, error);
}
}
It seems to work but I always have failed request even when I'm sure that the user1 is following the user2, here is the log message:
Request isRequestIdentifier : E8284E63-A5B0-4C18-A3DB-B4F0A5E6048E failed with error: Error Domain=HTTP Code=400 "The operation couldn’t be completed. (HTTP error 400.)"
Any idea on what I'm doing wrong?
Thanks for your help.