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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T07:01:01+00:00 2026-06-14T07:01:01+00:00

I have quick question: this code snippet works: NSArray *permissions = @[@email, @user_birthday]; return

  • 0

I have quick question:

this code snippet works:

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

And this doesn’t:

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

I’m simply asking for the gender of the Facebook user and in first case I’ve got on my NSLog console: User session found which is great… but when I extend the permission and include gender in it, I’ve got UIAlertView with:
Error
The operation couldn’t be completed. (com.facebook.sdk error 2.)

What I am doing wrong? How to ask for permission to get user gender?

  • 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-14T07:01:02+00:00Added an answer on June 14, 2026 at 7:01 am

    Look at the list of permissions – gender is not one of them – gender is, however a field of the User object and is also exposed in the sex column in the user FQL table which you can access once the user has granted you the basic permission to access their data.

    A sample query (SDK agnostic) to return just the current user’s gender is simply
    /me?fields=gender, the return value of which will be

    {
      "gender": "male", 
      "id": "533875325"
    }
    

    Note that it’s also returned in the default response when accessing a user, so you don’t need to specify it explicitly.

    Also, some users may not have a gender defined (though i think this is relatively rare)

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

Sidebar

Related Questions

Quick question, What have I done wrong here. The purpose of this code is
Really quick jQuery question... I have this function: $(document).ready(function() { $('a#show1').click(function() { $('.item1').toggle(1000); return
Another quick question here, I have this code: string sa[6] = { Fort Sumter,
Another quick question if anyone is up to it. I have this code: for(int
quick question really: I have this code: using System; using System.Collections.Generic; using System.Linq; using
I have this quick question, i have got the username variable from a form
Quick question... I have a query that checks for duplicates that looks like this:
This is just a quick question in C#. I have a scenario where I
Quick question. I have an app that use a native DLL through PInvoke, this
I have a quick question about Java synchronization. Please assume the following code: public

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.