我正在尝试使用FBUserSettingsViewController
,但每次我尝试关闭它时它都会崩溃。我使用以下代码来显示它:
PS:它只在 ios 6 上崩溃并出现此错误:
// [FBUserSettingsViewController dealloc];
FBUserSettingsViewController *a =[[FBUserSettingsViewController alloc] init];
[a setDefaultAudience:FBSessionDefaultAudienceEveryone];
[a setDelegate:self];
[a setPublishPermissions: [NSArray arrayWithObject:@"publish_actions"]];
[nav presentViewController:a animated:NO completion:nil];
这将其解雇:
- (void)facebookViewControllerDoneWasPressed:(id)sender{
_facebook = [[Facebook alloc]
initWithAppId:@"176237615850674"
andDelegate:self];
// Store the Facebook session information
_facebook.accessToken = FBSession.activeSession.accessToken;
_facebook.expirationDate = FBSession.activeSession.expirationDate;
if ([nav respondsToSelector:@selector(dismissViewControllerAnimated:completion:)])
[nav dismissViewControllerAnimated:YES completion:nil];
else [nav dismissModalViewControllerAnimated:YES];
}
关于这个主题还有另一个问题,但那里没有任何答案