问题出在 if([[topViewController presentViewController]
行:
(void)sessionStateChanged:(FBSession *)session
state:(FBSessionState) state
error:(NSError *)error
{
switch (state) {
case FBSessionStateOpen: {
UIViewController *topViewController =
self.navController topViewController];
if ([[topViewController presentViewController]
isKindOfClass:[PBLoginViewController class]]) {
[topViewController dismissViewControllerAnimated:YES completion:nil];