【问题标题】:FacebookLikeView crashing all the time iOSFacebookLikeView 一直在崩溃 iOS
【发布时间】:2013-07-26 14:46:27
【问题描述】:

我一直在许多应用程序中使用 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];

【问题讨论】:

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


    【解决方案1】:

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

    【讨论】:

      猜你喜欢
      • 2011-10-23
      • 2011-07-24
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-02-08
      • 2022-06-10
      • 1970-01-01
      相关资源
      最近更新 更多