5

我有一些不同商店的预定义位置。我想通过我的 IOS 应用程序签到这些位置。我该怎么做?

这是我用于 IOS 5 的代码

AppDelegate *appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
SBJSON *jsonWriter = [SBJSON new];
NSMutableDictionary *coordinatesDictionary = [NSMutableDictionary dictionaryWithObjectsAndKeys:
                                              [NSString stringWithFormat: @"%f", latitude], @"latitude",
                                              [NSString stringWithFormat: @"%f", longitude], @"longitude",
                                              nil];
NSString *coordinates = [jsonWriter stringWithObject:coordinatesDictionary];
NSMutableDictionary *params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
                               [[placesArray objectAtIndex:indexPath.row] objectForKey:@"id"], @"place", //The PlaceID
                               coordinates, @"coordinates", // The latitude and longitude in string format (JSON)
                               @"Testing check in", @"message", // The status message
                               nil];
//                                       tags, @"tags", // The user's friends who are being checked in

[[appDelegate facebook] requestWithGraphPath:@"me/checkins" andParams:params andHttpMethod:@"POST" andDelegate: self];
// Deselect
4

0 回答 0