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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T17:35:31+00:00 2026-06-14T17:35:31+00:00

I am upgrading to the facebook 3.0 sdk for ios. Things went well, until

  • 0

I am upgrading to the facebook 3.0 sdk for ios. Things went well, until I tried to open an existing session after relaunching the application. I am trying to access the list of friends for the facebook user.

if ([[FBSession activeSession] isOpen]) {
    [request startWithCompletionHandler:^(FBRequestConnection *connection, id result, NSError *error) {
        //do something here
    }];
}else{
    [[self session] openWithCompletionHandler:^(FBSession *session, FBSessionState status, NSError *error) {
        if ([self isValid]) {
            [request startWithCompletionHandler:^(FBRequestConnection *connection, id result, NSError *error) {
                //log this error we always get
                NSLog(@"%@",error);
                //do something else
            }];
        }
    }];
}

However I get this error:

Error Domain=com.facebook.sdk Code=5 "The operation couldn’t be completed. (com.facebook.sdk error 5.)" UserInfo=0x1d92ff40 {com.facebook.sdk:ParsedJSONResponseKey={
  body =     {
    error =         {
        code = 2500;
        message = "An active access token must be used to query information about the current user.";
        type = OAuthException;
    };
  };
  code = 400;
}, com.facebook.sdk:HTTPStatusCode=400}

I’ve found that if I use the FBSession reauthorize method it allows me to complete the request without error, but it also means I must show UI or switch apps every time we relaunch the application which is unacceptable. Any suggestions on what I should be doing differently?

  • 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-14T17:35:32+00:00Added an answer on June 14, 2026 at 5:35 pm

    I was not setting the session on the request after logging in. Simple mistake.

    [[self session] openWithCompletionHandler:^(FBSession *session, FBSessionState status, NSError *error) {
        if ([self isValid]) {
            //I should have been doing this
            request.session = [FBSession activeSession];
            [request startWithCompletionHandler:^(FBRequestConnection *connection, id result, NSError *error) {
                //log this error we always get
                NSLog(@"%@",error);
                //do something else
            }];
        }
    }];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am writing an app that publishes pictures on Facebook using facebook-ios-sdk, but everytime
I am working on an Iphone application and I am using facebook sdk to
I am having an issue when upgrading from Facebook's PHP SDK version 2.1.2 to
In upgrading my application from v1 to v2, I've made a few small changes
After upgrading to a newer hibernate version (guess it came with the switch from
After upgrading node to v0.8.1, bundled Meteor apps now throw an error: node: symbol
After upgrading to 12.04, my Eclipse that I had since 11.10 has been full
After upgrading from Spring 3.0.0.M4 to 3.0.0.RC1 and Spring Security 3.0.0.M2 to 3.0.0.RC1, I've
After upgrading to ReSharper5 it gives me even more useful tips on code improvements.
I need to upload video files through Facebook application and later visualize all uploaded

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.