2012-06-09 3 views
0

FB 그래프 API를 사용하여 facebook.but에 iOS 어플리케이션을 통합했습니다. webview가 팝업되면, 첫 번째 문제는 취소 버튼이 없습니다. 여전히 버튼을 넣었습니다. 행동을 취하지 만 내가 왔던 곳에서 그 화면으로 갈 수 없었습니다.FB 그래프 API 인증 페이스 북

NSString *url_string = [NSString stringWithFormat:@"https://graph.facebook.com/oauth/authorize?client_id=%@&redirect_uri=%@&scope=%@&type=user_agent&display=touch", facebookClientID, redirectUri, extended_permissions]; 
NSURL *url = [NSURL URLWithString:url_string]; 
NSURLRequest *request = [NSURLRequest requestWithURL:url]; 

CGRect webFrame = [super_view frame]; 

webFrame.origin.y = 0; 
UIWebView *aWebView = [[UIWebView alloc] initWithFrame:webFrame]; 
[aWebView setDelegate:self];  
self.webView = aWebView; 

UIButton *button = [UIButton buttonWithType:UIButtonTypeRoundedRect]; 
button.frame = CGRectMake(5.0, 10, 150.0, 30.0); 
[button setTitle:@"My Button" forState:UIControlStateNormal]; 
[button addTarget:self action:@selector(myAction:) forControlEvents:UIControlEventTouchUpInside]; 
[self.webView addSubview:button]; 
[aWebView release]; 

[webView loadRequest:request]; 
[super_view addSubview:webView]; 

그래서 난 뒤로 이동하는 방법을 몇 가지 몸이 myAction: 방법 .....

+0

'myAction :'메소드는 어떻게 생겼습니까? – skram

+0

myAction :이 작업에서 나는 방금 내가 올 곳에서 나의 previousview 가고 싶었다 –

답변

0

를 좀 도와주세요은 webView

[self.webView removeFromSuperView]; 
+0

나는 이것을 시험해 보았다. 그러나 그것은 나에게 단지 빈 화면을 뚫는다. –

관련 문제