FBloginview无法在iOS5中运行

时间:2013-04-28 21:26:24

标签: objective-c xcode facebook-graph-api facebook-ios-sdk

我正在使用fb ios sdk 3.5,并且我尝试运行名为 Scrumptious 的示例项目随附软件包,它使用FBLoginView进行登录,但FBLoginView无法在iOS5.0上运行。当我按下FBLoginVIew时,它会保持按下状态并且没有任何操作。虽然它适用于iOS6。它打开了登录的野生动物园。我只在模拟器上测试,因为我没有设备。是FBloginView仅适用于iOS6设备吗?

- (void)loginViewShowingLoggedInUser:(FBLoginView *)loginView {
    // Upon login, transition to the main UI by pushing it onto the navigation stack.
    SCAppDelegate *appDelegate = (SCAppDelegate *)[UIApplication sharedApplication].delegate;
    [self.navigationController pushViewController:((UIViewController *)appDelegate.mainViewController) animated:NO];
}


- (void)loginViewShowingLoggedOutUser:(FBLoginView *)loginView {
    // Facebook SDK * login flow *
    // It is important to always handle session closure because it can happen
    // externally; for example, if the current session's access token becomes
    // invalid. For this sample, we simply pop back to the landing page.
    SCAppDelegate *appDelegate = (SCAppDelegate *)[UIApplication sharedApplication].delegate;
    if (appDelegate.isNavigating) {
        // The delay is for the edge case where a session is immediately closed after
        // logging in and our navigation controller is still animating a push.
        [self performSelector:@selector(logOut) withObject:nil afterDelay:.5];
    } else {
        [self logOut];
    }
}

0 个答案:

没有答案