Facebook对话框仅以纵向模式显示

时间:2018-10-13 17:44:00

标签: facebook orientation facebook-ios-sdk landscape facebook-sdk-4.0

我的应用程序上的“登录和共享”对话框出现问题。大约一周前,它们开始仅在“人像”模式下(正常或上下颠倒)出现,但横向模式不起作用。

 NSArray *permissions = @[@"user_photos",
                             @"user_likes",
                             @"user_friends",
                             @"email"];

    _loginManager = [[FBSDKLoginManager alloc] init];
    _loginManager.loginBehavior = FBSDKLoginBehaviorWeb;


    [_loginManager logInWithReadPermissions:permissions fromViewController:self handler:^(FBSDKLoginManagerLoginResult *result, NSError *error) {

        if(result.isCancelled || error)
        {
            [self pressedCancel];
            return;
        }
        
        NSSet* declinedPermissions = result.declinedPermissions;
        for (NSString *declinedPermission in declinedPermissions) {

            if(!nullOrEmpty(declinedPermission))
            {
                [self pressedCancel];
                return;
            }
        }
        if ([FBSDKAccessToken currentAccessToken]) {
//            self.settings.facebookToken = [FBSDKAccessToken currentAccessToken].tokenString;
            
            // Send data capture
            if([EventData sharedInstance].dataCaptureSettings.enabled)
            {
                [FacebookHelper getUserInfoWithCompletion:
                 ^(NSDictionary* userInfo, NSError* error)
                 {
                     if(!nullOrEmpty(userInfo))
                     {
                         [self captureData:userInfo];
                     } else {
                         [self captureData:nil];
                     }
                     
                      [self didSignIn];
                 }];
                return;
            } else {
                [self captureData:nil];
                [self didSignIn];
            }
        }
        
    }];

以下是MPOC来复制此问题: https://www.dropbox.com/s/p62vajqfk916bz1/FBTest.zip?dl=0

任何想法可能是什么原因造成的?还是我也可以使其在横向模式下工作?

谢谢!

1 个答案:

答案 0 :(得分:0)

以防万一其他人遇到此问题,该问题已在iOS的最新Facebook SDK(4.38.1)上修复