FaceBook在IOS 6和IOS 5中签入

时间:2013-02-07 06:27:25

标签: ios xcode facebook ios5 ios6

我有一些不同商店的预定义位置。我想通过我的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

0 个答案:

没有答案