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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T07:48:43+00:00 2026-06-08T07:48:43+00:00

I’m trying to figure out what this error means… I’m trying to get user

  • 0

I’m trying to figure out what this error means…

I’m trying to get user information via Facebook sdk. All I need is their email and name

Error Domain=facebookErrDomain Code=10000 "The operation couldn’t be completed. (facebookErrDomain error 10000.)" UserInfo=0xde94ad0 {error=<CFBasicHash 0xde7d100 [0x3f616650]>{type = mutable dict, count = 3,
entries =>
    2 : <CFString 0xde722a0 [0x3f616650]>{contents = "type"} = <CFString 0xdeba1a0 [0x3f616650]>{contents = "OAuthException"}
    3 : <CFString 0xde6ba20 [0x3f616650]>{contents = "message"} = <CFString 0xdeb12a0 [0x3f616650]>{contents = "An active access token must be used to query information about the current user."}
    6 : <CFString 0xde74c40 [0x3f616650]>{contents = "code"} = 2500
}
}

My basic code… (below in my viewDidLoad)

facebook = [[Facebook alloc] initWithAppId:@"random#123456" andDelegate:self];

    [self login];

(below in my login method)

- (void) login {
    NSArray *permissionsArray = [NSArray arrayWithObjects:@"email", nil];
    [facebook authorize:permissionsArray];
}

(and my Facebook request methods…)

- (void)request:(FBRequest *)request didLoad:(id)result {
    NSLog(@"Inside didLoad");
    if ([result isKindOfClass:[NSArray class]]) {
        result = [result objectAtIndex:0];
    }
    // When we ask for user infor this will happen.
    if ([result isKindOfClass:[NSDictionary class]]){
        //NSDictionary *hash = result;
        NSLog(@"Name: %@", [result objectForKey:@"name"]); 
    }
    if ([result isKindOfClass:[NSData class]])
    {
        NSLog(@"Profile Picture");
        //[profilePicture release];
        //profilePicture = [[UIImage alloc] initWithData: result];
    }
    NSLog(@"request returns %@",result);
    //if ([result objectForKey:@"owner"]) {}

};

- (void)request:(FBRequest *)request didFailWithError:(NSError *)error{ 
    NSLog(@"%@",error);
}

I’m really confused to why I get an error and what I need to change or add in order to fix it…

Any ideas?

EDIT: My request code:::

- (IBAction)requestFBFriends:(id)sender {
    NSLog(@"HERE");
    [facebook requestWithGraphPath:@"me/friends" 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-08T07:48:46+00:00Added an answer on June 8, 2026 at 7:48 am

    Here’s how you can get the name and email…
    I didn’t test it so if it doesn’t work just tell and I’ll find out the problem.

    The method that sends the request needs to authenticate if you don’t have a valid access token

    -(void)getUserFBInfo
    {
        NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
        if ([defaults objectForKey:@"FBAccessTokenKey"] && [defaults objectForKey:@"FBExpirationDateKey"]) {
            self.facebook.accessToken = [defaults objectForKey:@"FBAccessTokenKey"];
            self.facebook.expirationDate = [defaults objectForKey:@"FBExpirationDateKey"];
        }
        if (![self.facebook isSessionValid]) {
            NSLog(@"auth");
            [self.facebook authorize:[NSArray arrayWithObject:@"email"]];
        } else {
            [self apiFQLIMe];
        }
    }
    
    
    #pragma mark -
    #pragma mark FBSessionDelegate
    
    /**
     * Called when the user successfully logged in.
     */
    - (void)fbDidLogin
    {
        [self reportAction:@"FB allowed"];
        NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
        [defaults setObject:[self.facebook accessToken] forKey:@"FBAccessTokenKey"];
        [defaults setObject:[self.facebook expirationDate] forKey:@"FBExpirationDateKey"];
        [defaults synchronize];
        [self apiFQLIMe];
    }
    
    /**
     * Called when the user dismissed the dialog without logging in.
     */
    - (void)fbDidNotLogin:(BOOL)cancelled
    {
        NSLog("did not login");
    }
    
    /**
     * Called after the access token was extended. If your application has any
     * references to the previous access token (for example, if your application
     * stores the previous access token in persistent storage), your application
     * should overwrite the old access token with the new one in this method.
     * See extendAccessToken for more details.
     */
    - (void)fbDidExtendToken:(NSString*)accessToken
                   expiresAt:(NSDate*)expiresAt
    {
        NSLog(@"token extended");
        NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
        [defaults setObject:accessToken forKey:@"FBAccessTokenKey"];
        [defaults setObject:expiresAt forKey:@"FBExpirationDateKey"];
        [defaults synchronize];
    }
    
    /**
     * Called when the user logged out.
     */
    - (void)fbDidLogout
    {
        NSLog("did logout")
    }
    
    /**
     * Called when the current session has expired. This might happen when:
     *  - the access token expired
     *  - the app has been disabled
     *  - the user revoked the app's permissions
     *  - the user changed his or her password
     */
    - (void)fbSessionInvalidated
    {
        [self.facebook authorize:[NSArray arrayWithObject:@"email"]];
    }
    
    #pragma mark -
    #pragma mark FBRequestDelegate
    
    
    
    - (void)apiFQLIMe {
        NSMutableDictionary *params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
                                   @"SELECT name, first_name, middle_name, last_name, username, contact_email FROM user WHERE uid=me()", @"query",
                                   nil];
        [self.facebook requestWithMethodName:@"fql.query"
                                   andParams:params
                               andHttpMethod:@"POST"
                                 andDelegate:self];
    }
    
    
    /**
     * Called when the Facebook API request has returned a response.
     *
     * This callback gives you access to the raw response. It's called before
     * (void)request:(FBRequest *)request didLoad:(id)result,
     * which is passed the parsed response object.
     */
    - (void)request:(FBRequest *)request didReceiveResponse:(NSURLResponse *)response
    {
        DLog(@"received response");
    }
    
    /**
     * Called when a request returns and its response has been parsed into
     * an object.
     *
     * The resulting object may be a dictionary, an array or a string, depending
     * on the format of the API response. If you need access to the raw response,
     * use:
     *
     * (void)request:(FBRequest *)request
     *      didReceiveResponse:(NSURLResponse *)response
     */
    - (void)request:(FBRequest *)request didLoad:(id)result 
    {
        NSLog(@"%@",result);
        // check the log to know how you receive the result
    }
    
    /**
     * Called when an error prevents the Facebook API request from completing
     * successfully.
     */
    - (void)request:(FBRequest *)request didFailWithError:(NSError *)error 
    {
        NSLog(@"Err message: %@", [[error userInfo] objectForKey:@"error_msg"]);
        NSLog(@"Err code: %d", [error code]);
    }
    

    If you have questions ask them in the comments

    • 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&#8217;Everest What PHP function
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I know there's a lot of other questions out there that deal with this
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each 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
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.