Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6718309
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T08:57:14+00:00 2026-05-26T08:57:14+00:00

I am trying to load a UIWebView with the Facebook OAuth authorization URL and

  • 0

I am trying to load a UIWebView with the Facebook OAuth authorization URL and I am using the following code. When my UIWebView loads with Facebook login page, I enter my credentials, then press the “Log in” button. When I hit the button I am getting the following error:

WebKit discarded an uncaught exception in the webView:decidePolicyForNavigationAction:request:frame:decisionListener:delegate: Application tried to present modally an active controller .

This same code works fine with iOS 4.3 and previous versions, but it doesn’t work in iOS 5.0. I don’t understand the problem, can anyone please help me?

NSString *redirectUrlString = @"http://www.facebook.com/connect/login_success.html";
NSString *authFormatString = @"https://graph.facebook.com/oauth/authorize?client_id=%@&redirect_uri=%@&scope=%@&type=user_agent&display=touch";

NSString *urlString = [NSString stringWithFormat:authFormatString, _apiKey, redirectUrlString, _requestedPermissions];
NSURL *url = [NSURL URLWithString:urlString];

NSLog(@"NSURL: %@", urlString);

NSURLRequest *request = [NSURLRequest requestWithURL:url];
[_webView loadRequest:request];
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T08:57:15+00:00Added an answer on May 26, 2026 at 8:57 am

    Are you using the Ray Wenderlich code? (FBFunLoginDialog).. I found that this fixes it:

    -(void)checkLoginRequired:(NSString *)urlString {
        NSLog(@"Url: %@",urlString);
        if ([urlString rangeOfString:@"login.php"].location != NSNotFound && [urlString rangeOfString:@"refid"].location == NSNotFound) {
                [_delegate displayRequired];
        } else if ([urlString rangeOfString:@"user_denied"].location != NSNotFound) {
             [_delegate closeTapped];
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to watch videos in my iphone app using the following code:
I am trying to load a html page through UIWebview.I need to disable all
I am trying to load google map to uiwebview after performing a query using
I am trying to have a BLACK colored UIWebView before its contents load. In
I'm trying to load a page that is basically an edit form inside a
I'm trying to load fragments of XHTML markup using jQuery's $.fn.load function, but it
I am trying to load UIImage object from NSData , and the sample code
I am trying to load twitter link in UIWebview.I have faced NSURLErrorDomain error The
I am trying to call a javascript in a html page using the function
Trying to load a page fragment, or at least jump to a div but

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.