FBGraph API is not in landscape mode

I am developing an iPad application in which Login is performed using the Facebbook graphical API. My application supports landscape mode. I integrated the FBGraph API, but it does not fit in landscape mode. Please suggest me how to show my facebook login in landscape mode.

Any suggestions would be highly appreciated.

+6
source share
3 answers

If you use the latest SDK from here , the Facebook login will be opened in the Safari or Faceebook application or will be obtained directly from the iOS 6 settings. It will not open the login window for our application, and there will be no orientation problem.

+1
source

use facebook sdk instead:

New facebook SDK

+1
source

We use the following method and its performance.

Use the following code in the view in which you intend to use fbgraph.

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { if (interfaceOrientation == UIInterfaceOrientationLandscapeLeft) { [self leftOrienation]; } else if (interfaceOrientation == UIInterfaceOrientationLandscapeRight) { [self rightOrientation]; NSLog(@"right"); } else { } // Return YES for supported orientations return (interfaceOrientation == UIInterfaceOrientationLandscapeLeft || interfaceOrientation == UIInterfaceOrientationLandscapeRight); } here i have initialized FbGraph as fbGraph. -(void)leftOrienation { CGAffineTransform newTransform; newTransform = CGAffineTransformMakeRotation(M_PI * 270 / 180.0f); fbGraph.webView.transform = newTransform; [fbGraph.webView setFrame:CGRectMake(0, 0, 768, 1024)]; } -(void)rightOrientation { CGAffineTransform newTransform; newTransform = CGAffineTransformMakeRotation(M_PI * 90 / 180.0f); fbGraph.webView.transform = newTransform; [fbGraph.webView setFrame:CGRectMake(0, 0, 768, 1024)]; } 
0
source

Source: https://habr.com/ru/post/898059/


All Articles