FBWebDialog rotation issue in iPad

蹲街弑〆低调 提交于 2019-12-22 11:11:07

问题


When I use following code to open FBWebDialog, Once FBWebDialog is open click in username textfield and keyboard is displayed now if you rotate iPad device, FBWebDialog is not auto-rotating to landscape orientation.

[FBSession setActiveSession: [[FBSession alloc] initWithPermissions:permission] ];
[[FBSession activeSession] openWithBehavior:FBSessionLoginBehaviorForcingWebView completionHandler:^(FBSession *session, FBSessionState status, NSError *error) {
    switch (status) {
        case FBSessionStateOpen:
            [self getMyData];
            break;
        case FBSessionStateClosedLoginFailed: {
            NSString *errorCode = [[error userInfo] objectForKey:FBErrorLoginFailedOriginalErrorCode];
            NSString *errorReason = [[error userInfo] objectForKey:FBErrorLoginFailedReason];
            BOOL userDidCancel = !errorCode && (!errorReason || [errorReason isEqualToString:FBErrorLoginFailedReasonInlineCancelledValue]);
            if(error.code == 2 && ![errorReason isEqualToString:@"com.facebook.sdk:UserLoginCancelled"]) {
                UIAlertView *errorMessage = [[UIAlertView alloc] initWithTitle:kFBAlertTitle message:kFBAuthenticationErrorMessage delegate:nil cancelButtonTitle:kOk otherButtonTitles:nil];
                [errorMessage performSelectorOnMainThread:@selector(show) withObject:nil waitUntilDone:YES];
                errorMessage = nil;
            }

        }
        break;
    // presently extension, log-out and invalidation are being implemented in the Facebook class
    default:
        break; // so we do nothing in response to those state transitions
    }
}];

Following are steps to reproduce this issue :

  1. Open FBWebialog which opens inside iPad app
  2. Click in username textfield and keyboard is displayed
  3. Now if you rotate iPad device, FBWebDialog is not auto-rotating to landscape orientation.

Please help me to solve this issue....


回答1:


Its bug from facebook side, here is the my query posted to the facbook support team. Even not getting any kind of response from Facebook,its ridicules...

https://developers.facebook.com/bugs/355080977928726?browse=external_tasks_search_results_52820409e9c884976463112



来源:https://stackoverflow.com/questions/17465088/fbwebdialog-rotation-issue-in-ipad

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!