FacebookLikeView一直在崩溃iOS

时间:2013-07-26 14:46:28

标签: exception ios5 facebook-like facebook-ios-sdk

我一直在很多应用程序中使用FacebookLikeView类来启用应用程序内的Facebook个人资料。最近代码已经开始崩溃我已经把它放入的每个应用程序.Facebook应用程序设置正确,一切。这是它提供EXC_BAD_ACCESS的行:

 else if ([fbEvent isEqualToString:@"xfbml.render"] && [_delegate respondsToSelector:@selector(facebookLikeViewDidRender:)])
        [_delegate facebookLikeViewDidRender:self];

它的实施方式如下:

_facebook = [[Facebook alloc] initWithAppId:fbAppID andDelegate:self];
self.facebookLikeView = [[FacebookLikeView alloc]init];
[self.facebookLikeView setFrame:CGRectMake(117, 140, 82, 19)];
self.facebookLikeView.delegate = self;

self.facebookLikeView.href = [NSURL URLWithString:user];
self.facebookLikeView.layout = @"button_count";
self.facebookLikeView.showFaces = NO;
[self.facebookLikeView load];

1 个答案:

答案 0 :(得分:0)

你应该在你的dealloc方法或viewdidunload方法中将你的facebookLikeView设置为nil