FB Graph API authentication for facebook



我使用FB graph api将我的iOS应用程序与Facebook集成。弹出网页视图,第一个问题是它没有取消按钮我仍然放了一个按钮并应用了一个动作,但无法从我来的地方进入那个屏幕。

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:方法中,删除webView

[self.webView removeFromSuperView];

最新更新