开发者

iPhone Facebook application crash after authorize

I make application using FBConnect.

I have take viewbase iPhone application

main delegate class

- (BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url{
    return [[viewController.view facebook] handleOpenURL:url];
}

controller class

-(void)awakeFromNib{
    permissions =  [[NSArray arrayWithObjects:
                     @"read_stream", @"offline_access",nil] retain];

    Facebook* facebook = [[Facebook alloc] initWithAppId:@"160696837308609"];
    [facebook authorize:permissions delegate:self];
}

when I run application it open a facebook view for allowing. When I click on allow then a black screen comes and application crashes.

When I restart application then webview comes with message that "You are already authorized click Okay". After click开发者_开发技巧ing OK same thing happen and app crashes.


I comment the line in delegate class return
[[viewController.view facebook] handleOpenURL:url];
then it works ok and come back to main screen

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜