Get user age group info on Facebook without asking for birthday permission

13,434

Solution 1

The API won't provide that detailed a breakdown without requesting a permission.

The signed_request will return ranges of

  • <18
  • 18-21
  • 21+

but for anything more than that, you're going to need user_birthday and/or friends_birthday

As you've mentioned though, insights gives more detail on ages, but not at a per user level.

Solution 2

Facebook Adds Age Ranges To Graph API.

For making it easier for mobile apps and websites that use Facebook login to restrict their content to people age 18-plus and 21-plus. Age range has long been available for apps on Facebook.com as part of the signed request, but we’re now also making it accessible via the graph API for all users that install your app. Apps that require users’ birthdays to gate age-sensitive content can increase their install rates by using this new age_range field instead.

For example, for a user who is 19 years old, you would get back:

“age_range”: {

“max”: 20,

“min”: 18,

}

check me/friends?fields=age_range

Share:
13,434

Related videos on Youtube

Manto
Author by

Manto

Living in the tech/game start-up world Engineering Mgr @ ElationHealth CTO @ Gummicube Co-Founder @ FableLabs

Updated on May 08, 2020

Comments

  • Manto
    Manto about 4 years

    Is there a way to know the age group an user falls under (like the break down they show on the demographics section on the application insight) without asking for their birthday permission?

    I don't need to know their birthday details - I just need to know if they fall into 18-24 bucket, 25-34 bucket, so on and so forth. It appears that many of the games out there have access to this information and use it in fine tuning their ad spend and ad targeting.

    Anyone has any idea if this is possible?

    Thanks!

  • Manto
    Manto over 12 years
    Interesting, where do I get the age range in the signed_request? Is it documented anywhere on FB?
  • pal4life
    pal4life about 12 years
    The bit about age range is mentioned here developers.facebook.com/docs/authentication/permissions but no mention of using signed request to get age range et all.
  • UpTheCreek
    UpTheCreek about 11 years
    Man I hate the facebook API :/
  • UpTheCreek
    UpTheCreek about 11 years
    If you're asking about an external app, I don't think this info is available (only for 'canvas' apps) : The age object, which is part of the user object will only be returned in the signed_request parameter for Canvas Apps; it will not be returned for external apps. developers.facebook.com/docs/reference/login/signed-request
  • smatthews1999
    smatthews1999 over 7 years
    Thank you for this. I would like to comment that In my case I only see a "min":21 value. I am 54 so I am assuming they are showing age tiers and not bracketing your age.

Related