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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T20:55:31+00:00 2026-06-15T20:55:31+00:00

Can anyone help me. I cannot figure out how to make a single FQL

  • 0

Can anyone help me. I cannot figure out how to make a single FQL query using the latest Facebook SDK (v 3.1) for iOS to get birthday and email of user’s friend. When I query for fields like name i get the correct value but get null for email and birthday field.

Here is my code

- (void)facebookViewControllerDoneWasPressed:(id)sender {

    // we pick up the users from the selection, and create a string that we use to update the text view
    // at the bottom of the display; note that self.selection is a property inherited from our base class
    for (id<FBGraphUser> user in _friendPickerController.selection) {
        _nameTxt.text = user.name;
        NSString *fql = [NSString stringWithFormat:@"SELECT email, birthday, name FROM user WHERE uid = %@ ",user.id];
        NSMutableDictionary *params = [NSMutableDictionary dictionaryWithObject:fql forKey:@"q"];
        [FBRequestConnection startWithGraphPath:@"/fql"
                                     parameters:params
                                     HTTPMethod:@"GET"
                              completionHandler:^(FBRequestConnection *connection,
                                              id result,
                                                      NSError *error) {
                                  if (error) {
                                      NSLog(@"Error: %@", [error localizedDescription]);
                                  } else {
                                      NSLog(@"Result: %@", result);
                                  }
                              }];

    }
    [self.navigationController dismissModalViewControllerAnimated:YES];
}

I’m getting value for name but null for email and birthday.

Thanks

  • 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-15T20:55:32+00:00Added an answer on June 15, 2026 at 8:55 pm

    Before you call your query, you’ll need to have the user log in and ask for email and user_birthday permissions. For example:

    - (BOOL)openSessionWithAllowLoginUI:(BOOL)allowLoginUI {
        NSArray *permissions = [[NSArray alloc] initWithObjects:
                            @"email",
                            @"user_birthday",
                            nil];
        return [FBSession openActiveSessionWithReadPermissions:permissions
                                              allowLoginUI:allowLoginUI
                                         completionHandler:^(FBSession *session,
                                                         FBSessionState state,
                                                         NSError *error) {
                                         [self sessionStateChanged:session
                                                             state:state
                                                             error:error];
                                     }];
    }
    

    The above method is used in the context of this tutorial:

    https://developers.facebook.com/docs/howtos/login-with-facebook-using-ios-sdk/

    Also check out the FQL tutorial:

    https://developers.facebook.com/docs/howtos/run-fql-queries-ios-sdk/

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

Sidebar

Related Questions

I cannot figure out how to do this. Can anyone help me out? Someone
I cannot figure out why this code will not work. Can anyone help? I
I cannot figure out why this is not working. Can anyone explain to me
Can anyone help me figure out how can i create a widget(Field API) which
Can anyone help me, I am trying to sort out some redirects using htaccess
Can anyone help or provide me with some suggestions for the below query. I
I am new to struts and spring security. Can anyone help me to figure
Hello can anyone help? I am using this full page slider.. http://www.musca.se/full-window-width-jquery-tools-content-slider-demo/ However i
I can't figure out how to get the values for the resulting matrix using
Can anyone help - this is driving me mad. I am calling a mysql

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.