Iphone FBGraph API未进入景观模式
我正在开发一个iPad应用程序,使用Facebbook图形API登录。我的应用程序支持横向模式。我已经集成了FBGraph API,但它不会以横向模式出现。请建议我如何以横向模式显示我的facebook登录视图Iphone FBGraph API未进入景观模式,iphone,objective-c,facebook-graph-api,Iphone,Objective C,Facebook Graph Api,我正在开发一个iPad应用程序,使用Facebbook图形API登录。我的应用程序支持横向模式。我已经集成了FBGraph API,但它不会以横向模式出现。请建议我如何以横向模式显示我的facebook登录视图 任何建议都将不胜感激。如果您使用来自的最新SDK,Facebook登录将在Safari或Facebook应用程序中打开,或直接从iOS 6设置获取。它不会在我们的应用程序中打开登录窗口,也不会出现定向问题 改用facebook sdk: Am采用以下方法,其工作正常 在要使用fbgrap
任何建议都将不胜感激。如果您使用来自的最新SDK,Facebook登录将在Safari或Facebook应用程序中打开,或直接从iOS 6设置获取。它不会在我们的应用程序中打开登录窗口,也不会出现定向问题 改用facebook sdk:
Am采用以下方法,其工作正常 在要使用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)];
}
谁在显示登录框?浏览器?申请书?登录框是如何被要求显示的?只是想澄清一下,它是在肖像中工作,还是根本不工作?是的,它在肖像中工作。谢谢大家的回答,但我在2011年问了这个问题,现在我已经知道了新的face book sdk。