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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T09:37:33+00:00 2026-06-01T09:37:33+00:00

I request @me , but requestDidLoadWithError method show this error. An active access token

  • 0

I request @"me", but requestDidLoadWithError method show this error.

An active access token must be used to query information about the current user.

I can’t resolve this problem. Any solution?

- (IBAction)loginBtn:(id)sender 
{
facebook = [[Facebook alloc] initWithAppId:@"231190276934148" andDelegate:self];

NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
if ([defaults objectForKey:@"FBAccessTokenKey"] && [defaults objectForKey:@"FBExpirationDateKey"]) {
    facebook.accessToken = [defaults objectForKey:@"FBAccessTokenKey"];
    facebook.expirationDate = [defaults objectForKey:@"FBExpirationDateKey"];
}

if (![facebook isSessionValid]) {
    NSArray *permissions = [[NSArray alloc] initWithObjects:
                            @"user_likes",
                            @"user_about_me",
                            nil];
    [facebook authorize:permissions];
}

[self fbDidLogin];

[facebook requestWithGraphPath:@"me" andDelegate:self];

}

  • 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-01T09:37:34+00:00Added an answer on June 1, 2026 at 9:37 am

    You have done every thing correct but not in correct flow.

    Just follow like this formatted code.

    - (void)viewDidLoad
    {
    [super viewDidLoad];
    
    permissions = [[NSArray alloc] initWithObjects:@"read_stream", @"publish_stream",@"offline_access", nil];
    
    facebook = [[Facebook alloc] initWithAppId:kAppId andDelegate:self];
    
    }
    
    -(IBAction)onClickLoginWithFb:(id)sender
    {
    if (![facebook isSessionValid]) {
        [ facebook authorize:permissions];
    }
    else {
        [facebook requestWithGraphPath:@"me" andDelegate:self];
    }
    }
    
    - (void)fbDidLogin {
    [appDelegate showLoadingView];
    [facebook requestWithGraphPath:@"me" andDelegate:self];
    // Save authorization information
    NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
    [defaults setObject:[facebook accessToken] forKey:@"FBAccessTokenKey"];
    [defaults setObject:[facebook expirationDate] forKey:@"FBExpirationDateKey"];
    [defaults synchronize];
    

    }

    - (void)fbDidLogout {
    
    NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
    [facebook invalidateSession];
    [defaults removeObjectForKey:@"FBAccessTokenKey"];
    [defaults removeObjectForKey:@"FBExpirationDateKey"];
    [defaults synchronize];
    

    }

    - (void)request:(FBRequest *)request didReceiveResponse:(NSURLResponse *)response {
    NSLog(@"received response");
    

    }

    - (void)request:(FBRequest *)request didLoad:(id)result {
    
    if ([result isKindOfClass:[NSArray class]]) {
        result = [result objectAtIndex:0];
    }
    

    }

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

Sidebar

Related Questions

This is a bit of a weird request but I am trying to set
Several of my ajax applications in the past have used GET request but now
I was trying to upload file(s) using PrototypeJs request method but I failed. The
This is a strange request but I'm looking for buggy Python code. I want
This might seem like an odd request but I'd like to use jQuery's Selectable
I found a couple of questions somewhat related to this: httpclient-request-set-attribute-question commons-httpclient-adding-query-string-parameters-to-get-post-request but I
Excuse the simplicity of this request - but is there a way for me
I understand that the http handlers process request but this is just theory as
I've a weird request but we must deal with these kinds of situation sometimes
Im making a async request but when I try to parse it with this

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.