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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T09:47:17+00:00 2026-05-25T09:47:17+00:00

How can I fix this error in my program? Using Facebook SDK. Error Domain=facebookErrDomain

  • 0

How can I fix this error in my program? Using Facebook SDK.

Error Domain=facebookErrDomain Code=10000 "The operation couldn’t be completed. (facebookErrDomain error 10000.)" UserInfo=0x5da9b10 {error=<CFBasicHash 0x5db09a0 [0x1087400]>{type = mutable dict, count = 2,
entries =>
    2 : <CFString 0x5db7920 [0x1087400]>{contents = "type"} = <CFString 0x5d35420 [0x1087400]>{contents = "OAuthException"}
    3 : <CFString 0x5d34970 [0x1087400]>{contents = "message"} = <CFString 0x5da96b0 [0x1087400]>{contents = "Error validating access token: The session is invalid because the user logged out."}
}
}
  • 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-25T09:47:18+00:00Added an answer on May 25, 2026 at 9:47 am

    I think the solution enbr posted is not complete. I will explain why:

    Access token errors are returned when the Facebook session expires and you continue using an old access token. Logout is not the only scenario in which sessions expire (e.g. change login password in the web). Hence, it is not enough to simply clean the user defaults after logout.

    From the client side, we don’t know if the access token we have is actually valid, until a response comes with such information. Therefore, you need to detect access token errors and restore the Facebook instance to a working state by cleaning the old access token and expiration date. This way, the user will need to login again to obtain a new access token.

    So, IMO, what you need to do is:

    1. Handle errors and detect when an access token error has occurred.

    2. When an access token error occurs, logout automatically and clean user defaults to remove old access token (step 3).

    3. As a result of logout, you need to clean user defaults for access token and expiration date (as enbr posted).

    Here you have some code that can be used to detect access token errors:

    -(BOOL)isAccessTokenError:(NSError *) error {
        if ([[error domain] isEqualToString:@"facebookErrDomain"] && [error code] == 10000 ) {
            NSDictionary *userInfo = [error userInfo];
            NSDictionary *errorAsDictionary = [userInfo objectForKey:@"error"];
            if ([[errorAsDictionary objectForKey:@"type"] isEqualToString:@"OAuthException"]) {
                //Invalid access token
                return YES;         
            }
        }
        if ([[error domain] isEqualToString:@"facebookErrDomain"] && ([error code] == 110 || [error code] == 190)) {
            //Error accessing access token
            return YES;         
        }
        return NO;
    }
    

    The places to handle such errors are:

    - (void)request:(FBRequest*)request didFailWithError:(NSError*)error; 
    - (void)dialog:(FBDialog*)dialog didFailWithError:(NSError *)error;
    

    I hope this helps.

    UPDATE:
    I forgot to mention. If you are using the SSO feature (most likely), I think it is a very good idea to clean the facebook cookies before login. Sometimes, after an invalid access token error, it seems login won’t bring back the Facebook object to a working state (valid access token) unless a “clean login” is performed. Not always work though.

    Also, If you are not using the SSO feature, this used to fix the ghost login popup that appeared to automatically disappear again.

    This is how I clean the cookies:

    NSHTTPCookieStorage* cookies = [NSHTTPCookieStorage sharedHTTPCookieStorage];
        NSArray* facebookCookies = [cookies cookiesForURL:
                                    [NSURL URLWithString:@"http://login.facebook.com"]];    
        for (NSHTTPCookie* cookie in facebookCookies) {
            [cookies deleteCookie:cookie];
        }
    enter code here
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How can I fix this error, and install thin or other gems? $ sudo
What causes this error, how can I fix it? Detailed Error Information Module IIS
This sure seems like a simple error to fix. However, I somehow can't figure
My navbar doesn't line up in IE... how can I fix this without using
Can anyone explain the output of this program and how I can fix it?
Ok I want some opinions how I can fix this mess of a method!
How can I fix this? REGEX: //REGEX $match_expression = '/Rt..tt<\/td> <td>(.*)<\/td>/'; preg_match($match_expression,$text,$matches1); $final =
Does anyone have an idea how can I fix this vulnerability in Apache 2.2.4
The Term::Size-module jumbles up the encoding. How can I fix this? #!/usr/bin/env perl use
I've been trying to fix this for two hours straight and I can't figure

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.