1

This code gives this error...why ?

'NSInvalidArgumentException', reason: '-[__NSDictionaryM length]: unrecognized selector sent to instance

 NSMutableDictionary *info = [NSMutableDictionary dictionaryWithObjectsAndKeys:longitude,@"longitude",latitude,@"latitude",nil];

 NSMutableDictionary *params = [NSMutableDictionary dictionaryWithObjectsAndKeys:  info, @"venue", nil];

 NSString *graphPath = [NSString stringWithFormat:@"/%@", (ID_OF_EVENT)];
 FBRequest *updateEvent = [FBRequest requestWithGraphPath:graphPath parameters:params HTTPMethod:POST];
 [updateEvent startWithCompletionHandler: ^(FBRequestConnection *connection,
                                                       NSDictionary* result,
                                                       NSError *error) {

I am trying to set the venue longitude and latitude, but no matter what I try I keep getting the run time error. What am I missing ? I thought "venue" is a dictionary under the main event and has the valid keys "longitude" and "latitude". Have one my parameters got to be an Array and not a dictionary ?

Actually I suspect these elements are non writable and I probably have to add the address at @"location" to see the details appear.

Regards

4

0 回答 0