FBConnect: “The user hasn't authorized the application to perform this action”

前端 未结 3 1457
渐次进展
渐次进展 2021-01-22 10:37

I m developing an iPhone app which includes facebook wall posting.After log in, I post to user\'s wall by following code:

NSString *appIcon = [NSString stringWit         


        
3条回答
  •  醉话见心
    2021-01-22 10:52

    The solution above uses FBPermissionDialog which is fine for changing the permissions after login, but you're better off just asking for the permission on the initial login. That way you are not opening up the external browser twice.

    if (![facebook isSessionValid]) {
        NSArray *permissions = [[NSArray alloc] initWithObjects:
                                @"publish_stream",
                                nil];
        [facebook authorize:permissions];
        [permissions release];        
    }
    

提交回复
热议问题