Divya Bhalodiya Divya Bhalodiya - 2 months ago 26
iOS Question

FBWebDialog rotation issue in iPad

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....

Answer Source

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