我尝试使用 FacebookSDK-3.0.pkg FBPlacePickerViewController 但是当我点击按钮而不是崩溃时,请给我一些建议,非常感谢..
- (IBAction)pickPlaceClick:(UIButton *)sender {
FBPlacePickerViewController *placePickerController = [[FBPlacePickerViewController alloc] init];
placePickerController.title = @"Pick a Seattle Place";
placePickerController.locationCoordinate = CLLocationCoordinate2DMake(25.047723, 121.450088);
[placePickerController loadData];
[placePickerController presentModallyFromViewController:self animated:YES handler:
^(FBViewController *sender, BOOL donePressed) {
if (!donePressed) {
return;
}
[[[UIAlertView alloc] initWithTitle:@"You Picked:"
message:placePickerController.selection.name
delegate:nil
cancelButtonTitle:@"OK"
otherButtonTitles:nil]
show];
}];
}
崩溃日志:
2012-09-06 15:09:18.489 FacebookUserPost[35205:707] -[__NSCFDictionary length]: unrecognized selector sent to instance 0x1abc00
2012-09-06 15:09:18.498 FacebookUserPost[35205:707] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFDictionary length]: unrecognized selector sent to instance 0x1abc00'
*** First throw call stack:
(0x311b788f 0x374f5259 0x311baa9b 0x311b9915 0x31114650 0x31100f19 0x3111d2cd 0x3111c1ad 0x3111d279 0x31a3efb1 0x31a3ee8b 0x642ad 0x6475f 0x308a2efb 0x308a1fd9 0x308a1763 0x30845f37 0x311161fb 0x378edaa5 0x378ed6bd 0x378f1843 0x378f157f 0x378e94b9 0x3118bb1b 0x31189d57 0x3118a0b1 0x3110d4a5 0x3110d36d 0x33187439 0x30870cd5 0x4af5d 0x4aef8)
terminate called throwing an exception(lldb)
而不是我标记这个:
//placePickerController.locationCoordinate = CLLocationCoordinate2DMake(25.047723, 121.450088);
没有崩溃,但告诉我错误:
Error: HTTP status code: 500