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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T08:34:47+00:00 2026-05-18T08:34:47+00:00

I have the Facebook iOS SDK set up in my app. However, I have

  • 0

I have the Facebook iOS SDK set up in my app. However, I have trouble determining when my session is finished. How to check if it’s finished, and where (how) to store the access token received by the login?

I need to determine whether I have the access token or not right from the beginning so I know whether to log in again, or go forward in the app.

  • 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-18T08:34:48+00:00Added an answer on May 18, 2026 at 8:34 am

    Are you familiar with NSUserDefaults ? It is for storing preferences for your app.

    They are extremely easy to use, and probably what you are looking for. So it’s just something like ..

    NSUserDefaults *factoids;
    NSString *whateverIDstring; // make this a property for convenience  
    
    factoids = [NSUserDefaults standardUserDefaults];
    self.whateverIDstring = [factoids stringForKey:@"storeTheStringHere"];
    
    if ( ( whateverIDstring == Nil ) || ( [whateverIDstring isEqualToString:@""] ) )
        // it does not yet exist, so try to make a new one...
    else
        // we already made one last time the program ran
    
    // when you make a new one, save it in the prefs file like this...   
    [factoids setObject:yourNewString forKey:@"storeTheStringHere"];
    [factoids synchronize];
    

    Hope it helps!

    ONE get the preferences in to ‘factoids’ as in the example above

    TWO decide on a name for your preference. ‘storeTheStringHere’ in the example.

    THREE get your string ‘whateverIDstring’ in the example using stringForKey:

    FOUR check if it is either nil or blank. if so, start fresh.

    FIVE once you get the value, save it as shown!

    Hope it helps!

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

Sidebar

Related Questions

I have a PhoneGap app in which I've just added the Facebook iOS SDK,
I downloaded the sample app from the latest facebook ios SDK. I set my
Ok, I have been trying to get my ios app working with the facebook-ios-sdk.
I have integrated Facebook functionality into my applications. By using the link https://github.com/facebook/facebook-ios-sdk ,
I have made an application which uses latest ios facebook sdk to connect. I
I'm using the latest facebook iOS SDK (supporting SSO) to connect my iPhone app
I'm having trouble logging in with publish permissions in the facebook 3.1 ios sdk.
I have an issue with the Facebook iOS SDK. Here is what happens: I
I have a strange issue trying to run the Facebook iOS SDK DemoApp (from
I have a issue to make a facebook sign-up feature in ios app. I

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.