0
我试图在启用了iOS5 ARC的应用程序中使用Hackbook示例应用程序。我使用Facebook的示例Hackbook应用程序中的APIResultsViewController。我的应用程序启用了ARC,因此我确保我从Hackbook使用的文件将-fno-objc-arc
添加为编译器标志。我现在得到的错误是Use of undeclared identifer 'jsonWriter'; did you mean SBJSonWriter'?
和Unknown receiver 'jsonWriter'
将Facebook的Hackbook集成到iOS5应用程序中
我有来自Facebook API的src文件夹的SBJSON。我能够让Facebook Api在我的应用程序中工作。然后我想使用Hackbook示例中的功能和代码。将代码移到弹出的错误之后。感谢您的帮助
这里的地方的错误都存在的
* Graph API: Check in a user to the location selected in the previous view.
*/
- (void)apiGraphUserCheckins:(NSUInteger)index {
AppDelegate *delegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
SBJSON *jsonWriter = [[SBJSON new] autorelease];
NSDictionary *coordinates = [NSDictionary dictionaryWithObjectsAndKeys:
[[[myData objectAtIndex:index] objectForKey:@"location"] objectForKey:@"latitude"],@"latitude",
[[[myData objectAtIndex:index] objectForKey:@"location"] objectForKey:@"longitude"],@"longitude",
nil];
NSString *coordinatesStr = [jsonWriter stringWithObject:coordinates];
NSMutableDictionary *params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
[[myData objectAtIndex:index] objectForKey:@"id"], @"place",
coordinatesStr, @"coordinates",
@"", @"message",
nil];
[[delegate facebook] requestWithGraphPath:@"me/checkins"
andParams:params
andHttpMethod:@"POST"
andDelegate:self];
}
感谢您的帮助
我有来自Facebook API src文件夹的SBJSON。我能够让Facebook Api在我的应用程序中工作。然后我想使用Hackbook示例中的功能和代码。将代码移到弹出的错误之后。感谢您的帮助 – hanumanDev 2012-04-16 09:03:16
完全没问题。 – 2012-04-30 03:45:56