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 9045023
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T11:08:36+00:00 2026-06-16T11:08:36+00:00

I have had the Facebook iOS SDK running in an app I’ve been working

  • 0

I have had the Facebook iOS SDK running in an app I’ve been working on for a few months. At this point I am mostly using the SDK for SSO purposes.

Since I have started using iOS 6.0 I have been seeing an issue where the “Login to use your FB account with MY_APP” modal is blocking my current view.
The odd thing is that the user is already authenticated and apparently authorized to use my app. This is proven by the fact that I can get the user’s email address and such.

It is also important to note that if I click the “X” it will close and everything is fine (user is authenticated/authorized). If I login as it tells me, it shows the “MY_APP is already authorized” modal which I cannot click the “Okay” button but I can click the “X” which again drops me back into my view with the user authenticated and authorized.

Here you can see the it:

enter image description here

To authenticate I am calling the following method in the appdelegate:

[appDelegate openSessionWithAllowLoginUI:YES];

The following are the relevant FB methods in my appdelegate:

// FACEBOOK STUFF
- (BOOL)openSessionWithAllowLoginUI:(BOOL)allowLoginUI {
    NSArray *permissions = [NSArray arrayWithObjects: @"email", nil];
    return [FBSession openActiveSessionWithReadPermissions:permissions
                                              allowLoginUI:allowLoginUI
                                         completionHandler:^(FBSession *session, FBSessionState status, NSError *error) {
                                             [self sessionStateChanged:session state:status error:error];
                                         }];    
}

- (void)sessionStateChanged:(FBSession *)session 
                      state:(FBSessionState)state
                      error:(NSError *)error {
    // FBSample logic
    // Any time the session is closed, we want to display the login controller (the user
    // cannot use the application unless they are logged in to Facebook). When the session
    // is opened successfully, hide the login controller and show the main UI.
    switch (state) {
        case FBSessionStateOpen: {
            FBCacheDescriptor *cacheDescriptor = [FBFriendPickerViewController cacheDescriptor];
            [cacheDescriptor prefetchAndCacheForSession:session];
            [self sendAuthenticationStatusChangedNotification];
        }
            break;
        case FBSessionStateClosed:
        case FBSessionStateClosedLoginFailed:
            // FBSample logic
            // Once the user has logged in, we want them to be looking at the root view.
            [FBSession.activeSession closeAndClearTokenInformation];
            //[self showLoginView];
            break;
        default:
            break;
    }
    if (error) {
        UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"Error"
                                                            message:error.localizedDescription
                                                           delegate:nil
                                                  cancelButtonTitle:@"OK"
                                                  otherButtonTitles:nil];
        [alertView show];
    }    
}

- (BOOL)application:(UIApplication *)application 
            openURL:(NSURL *)url
  sourceApplication:(NSString *)sourceApplication 
         annotation:(id)annotation {
    // FBSample logic
    // We need to handle URLs by passing them to FBSession in order for SSO authentication
    // to work.
    return [FBSession.activeSession handleOpenURL:url];
}

EDIT 1

I noticed that this is happing on one of my phones but not the other. The phone that wasn’t working had an older version of the FB app installed. Updating the FB app stopped this issue from happening. I am still interested in a fix to avoid others from experiencing the same issue.

EDIT 2

The issue went away for a little but now is back even with the new facebook app installed. Please help!

  • 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-06-16T11:08:37+00:00Added an answer on June 16, 2026 at 11:08 am

    The problem for me actually turned out to be a silly one. I was calling

    [appDelegate openSessionWithAllowLoginUI:YES];
    

    two times due to a button click event that was wired up twice. As soon as it was only being called once, the issue went away!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Since I have just started working with Facebook's api I had a few questions
I have had the Facebook SDK working in the APPDelegate as instructed by the
I have had the Facebook SDK working in the APPDelegate as instructed by the
I have had to compile my app for the 4.0 sdk to run on
I have had this problem crop up a few times and I can't figure
I have had a few problems getting this right, so I wanted to ask
I just updated my app with the new Facebook 3.0 SDK for iOS. Prior
I have been trying to fix this for a while but I have had
I've been building out a social gifting platform, and have had an application running
I have a game that I've been working on for iOS. We let our

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.