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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T14:04:17+00:00 2026-06-15T14:04:17+00:00

A quick question about the Facebook SDK for iOS. I’m trying to implement the

  • 0

A quick question about the Facebook SDK for iOS. I’m trying to implement the functionality for a user to grant my app access to extended permissions.

While the code works fine when the user accepts the extended permission request (from the Facebook iOS app the user gets redirected to), I’m having trouble detecting when the user has returned to the app while having neither accepted the permissions, or clicking cancel then returning to the app.

If I click ‘Cancel’ and multitask back into the app, there is nothing logged and nothing shown on-screen. When I try to re-authorize again, the Facebook SDK throws an exception:

FBSession: It is not valid to reauthorize while a previous reauthorize call has not yet completed.

While I can catch the exception, it still doesn’t help as I can’t figure out how to stop the previous call in order to allow the user to try to re-authorize again.

Here’s the code I’m using at the moment:

@try {
    [[FBSession activeSession] reauthorizeWithPermissions:[self requiredPermissions]
                                             behavior:FBSessionLoginBehaviorWithFallbackToWebView
                                    completionHandler:^(FBSession *session, NSError *error) {
        if (!error) {
            [self fetchUserPermissionsWithCompletionHandler:^(BOOL extendedGranted) {
                if (extendedGranted) {
                    [self setCanPostToActivityStream:YES];
                }
            }];
        }
        else {
            NSLog(@"%@", [error localizedDescription]);
        }
    }];
}
@catch (NSException *exception) {
    NSLog(@"%@", exception);
}

Now, the issue is not with the code above – the code works fine. The issue I’m having, again, is cancelling the previous re-authorize call when the user doesn’t return to the app successfully after allowing permissions. The Facebook SDK as it is doesn’t seem to alert the app of this situation in any way.

  • 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-15T14:04:18+00:00Added an answer on June 15, 2026 at 2:04 pm

    From your App’s delegate, when - (void)applicationDidBecomeActive:(UIApplication*)application is invoked, you need to make a call to the active session’s handleDidBecomeActive method. Once you do that, the completion handler associated with your reauthorizeWithPublishPermissions call will be invoked, and will provide the appropriate error.

    - (void)applicationDidBecomeActive:(UIApplication*)application
    {
        [[FBSession activeSession] handleDidBecomeActive];
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Quick question about JavaScript event objects - how does JavaScript know when I'm trying
I have a quick question about ARC in iOS. (Sorry I've asked so many
Have a quick question about what would be the best way to implement iterators
quick question about Heroku. My app is using a gem called opentok. To function
I have a quick question about active resource. If I have a User resource,
Quick question about OpenMP: I'm not sure how to implement a nested double for
Quick question about android market application updates. If I have an app on the
quick question about using ORMLite. I am trying to make sure that my implementation
Possible Duplicate: facebook page tab app name in url Just a quick question to
Quick question about the TransactionScope object. Found this on the internet: When you access

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.