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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T01:24:49+00:00 2026-06-12T01:24:49+00:00

I’m using the 3.1 Facebook SDK with iOS 6 Facebook set up in Settings

  • 0

I’m using the 3.1 Facebook SDK with iOS 6 Facebook set up in Settings and my app authorized.

This executes flawlessly:

[FBSession openActiveSessionWithReadPermissions:nil allowLoginUI:YES completionHandler:^(FBSession *fbSession, FBSessionState fbState, NSError *error) { ... }

However now when I try to get ‘me’ information I’m getting an error:

com.facebook.sdk:ParsedJSONResponseKey = {
    body =     {
        error =         {
            code = 190;
            "error_subcode" = 463;
            message = "Error validating access token: Session has expired at unix time 1348704000. The current unix time is 1348706984.";
            type = OAuthException;
        };
    };
    code = 400;
}

If I look at [error code] it’s equal to 5. Shouldn’t I have a valid access token after just logging in? Do I need to call reauthorize?

UPDATE: Reauthorizing doesn’t help. Oddly the accessToken for my activeSession is always coming back the same. This despite calling closeAndClearToken.

  • 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-12T01:24:50+00:00Added an answer on June 12, 2026 at 1:24 am

    UPDATE:
    This issue has been addressed in Facebook iOS SDK 3.1.1.


    I synched the code off of github and found that they weren’t calling accountStore renewCredentialsForAccount:completion: anywhere. I changed the following code in authorizeUsingSystemAccountStore and it seems to have resolved the issue.

    // we will attempt an iOS integrated facebook login
    [accountStore requestAccessToAccountsWithType:accountType
                                          options:options
                                       completion:^(BOOL granted, NSError *error) {
    
                                           // this means the user has not signed-on to Facebook via the OS
                                           BOOL isUntosedDevice = (!granted && error.code == ACErrorAccountNotFound);
    
                                           dispatch_block_t postReauthorizeBlock = ^{
                                               NSString *oauthToken = nil;
                                               if (granted) {                                                                                                      
                                                   NSArray *fbAccounts = [accountStore accountsWithAccountType:accountType];
                                                   id account = [fbAccounts objectAtIndex:0];
                                                   id credential = [account credential];                                                   
                                                   oauthToken = [credential oauthToken];
                                               }
    
                                               // initial auth case
                                               if (!isReauthorize) {
                                                   if (oauthToken) {
                                                       _isFacebookLoginToken = YES;
                                                       _isOSIntegratedFacebookLoginToken = YES;
    
                                                       // we received a token just now
                                                       self.refreshDate = [NSDate date];
    
                                                       // set token and date, state transition, and call the handler if there is one
                                                       [self transitionAndCallHandlerWithState:FBSessionStateOpen
                                                                                         error:nil
                                                                                         token:oauthToken
                                                        // BUG: we need a means for fetching the expiration date of the token
                                                                                expirationDate:[NSDate distantFuture]
                                                                                   shouldCache:YES
                                                                                     loginType:FBSessionLoginTypeSystemAccount];
                                                   } else if (isUntosedDevice) {
                                                       // even when OS integrated auth is possible we use native-app/safari
                                                       // login if the user has not signed on to Facebook via the OS
                                                       [self authorizeWithPermissions:permissions
                                                                      defaultAudience:defaultAudience
                                                                       integratedAuth:NO
                                                                            FBAppAuth:YES
                                                                           safariAuth:YES
                                                                             fallback:YES
                                                                        isReauthorize:NO];
                                                   } else {
                                                       // create an error object with additional info regarding failed login
                                                       NSError *err = [FBSession errorLoginFailedWithReason:nil
                                                                                                  errorCode:nil
                                                                                                 innerError:error];
    
                                                       // state transition, and call the handler if there is one
                                                       [self transitionAndCallHandlerWithState:FBSessionStateClosedLoginFailed
                                                                                         error:err
                                                                                         token:nil
                                                                                expirationDate:nil
                                                                                   shouldCache:NO
                                                                                     loginType:FBSessionLoginTypeNone];
                                                   }
                                               } else { // reauth case
                                                   if (oauthToken) {
                                                       // union the requested permissions with the already granted permissions
                                                       NSMutableSet *set = [NSMutableSet setWithArray:self.permissions];
                                                       [set addObjectsFromArray:permissions];
    
                                                       // complete the operation: success
                                                       [self completeReauthorizeWithAccessToken:oauthToken
                                                                                 expirationDate:[NSDate distantFuture]
                                                                                    permissions:[set allObjects]];
                                                   } else {
                                                       // no token in this case implies that the user cancelled the permissions upgrade
                                                       NSError *error = [FBSession errorLoginFailedWithReason:FBErrorReauthorizeFailedReasonUserCancelled
                                                                                                    errorCode:nil
                                                                                                   innerError:nil];
                                                       // complete the operation: failed
                                                       [self callReauthorizeHandlerAndClearState:error];
    
                                                       // if we made it this far into the reauth case with an untosed device, then
                                                       // it is time to invalidate the session
                                                       if (isUntosedDevice) {
                                                           [self closeAndClearTokenInformation];
                                                       }
                                                   }
                                               }
                                           };
    
    
    
                                           if (granted) {
                                               [accountStore renewCredentialsForAccount:[[accountStore accountsWithAccountType:accountType] lastObject] completion:^(ACAccountCredentialRenewResult renewResult, NSError *error) {
                                                   dispatch_async(dispatch_get_main_queue(), postReauthorizeBlock);
                                               }];
                                           } else {
                                               // requestAccessToAccountsWithType:options:completion: completes on an
                                               // arbitrary thread; let's process this back on our main thread
                                               dispatch_async(dispatch_get_main_queue(), postReauthorizeBlock);
                                           }
    
                                       }];
    
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
We're building an app, our first using Rails 3, and we're having to build
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I am using Paperclip to handle profile photo uploads in my app. They upload
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
That's pretty much it. I'm using Nokogiri to scrape a web page what has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text
I am reading a book about Javascript and jQuery and using one of the
this is what i have right now Drawing an RSS feed into the php,

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.