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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T18:13:40+00:00 2026-06-04T18:13:40+00:00

I want to get basic user information from Facebook, but having some problem in

  • 0

I want to get basic user information from Facebook, but having some problem in the following code

-(void)checkForAccessToken:(NSString *)urlString {
    NSError *error;
    NSRegularExpression *regex = [NSRegularExpression regularExpressionWithPattern:@"access_token=(.*)&" options:0 error:&error];
    if (regex != nil) {
        **NSTextCheckingResult *firstMatch = [regex firstMatchInString:urlString options:0 range:NSMakeRange(0, [urlString length])];
        if (firstMatch) {
            NSRange accessTokenRange = [firstMatch rangeAtIndex:1];
            NSString *accessToken = [urlString substringWithRange:accessTokenRange];
            accessToken = [accessToken stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
            [_delegate accessTokenFound:accessToken];               
        }**
    }
}

In the firstMatch I am getting NULL that’s why [_delegate accessTokenFound:accessToken]; this methods not get called.

Can anyone please help me out so that I would be able to user information from Facebook

Thanks in advance.

  • 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-04T18:13:42+00:00Added an answer on June 4, 2026 at 6:13 pm

    Call the fbdid login method after initialising it with app id and credentials.-

    (void)fbDidLogin {
    
    NSLog(@"fbDidLogin");
    isFacebookLoaded=YES;
    
    
    NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
    [defaults setObject:[facebook accessToken] forKey:@"FBAccessTokenKey"];
    [defaults setObject:[facebook expirationDate] forKey:@"FBExpirationDateKey"];
    [defaults synchronize];
    NSLog(@"i am in and my acees token is %@ %@ and call me.CALLshowAloadingView",[facebook accessToken],[facebook expirationDate]) ;
    [self.facebook requestWithGraphPath:@"me" andDelegate:self];
    if ( [delegate respondsToSelector:@selector(showAloadingView)] ) 
    {
        NSLog(@" CALLshowAloadingView");
        // calling delegate method. For this method to function, the delegate should be implemented in the calling class.
        [delegate showAloadingView];                
    }
    
    
    // Inform the delegate that Login is successful
    if ( [delegate respondsToSelector:@selector(loginStatus:)] ) {
        // calling delegate method. For this method to function, the delegate should be implemented in the calling class.
        [delegate loginStatus:YES];                 
        return;
    }   
    

    }

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

Sidebar

Related Questions

I want to get myself into programming some serious GUI based applications, but when
I'm trying to get started with Three20 and just want to get a basic
This is very basic magento question i guess. I want to first get all
I want get as much as possible from Redis + Hiredis + libevent. I'm
I want to get print out invoice but also wanna set margins and page
Hopefully I'll get some help here. Basic setup is this: My application swaps out
I have a scenario I want to use a partial view but I'm having
I have a repository class that defines some basic Get/Save/Delete methods. Inside these, I
I have some code below. This code is a basic push/pop stack class that
I want get the time used for a case so I can create an

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.