Question

With Facebook Graph API V. 1 I could get the gender and locale of any user with a call to /{userId}.

With Version 2 of the graph API these fields don't get returned, even with (the now obligatory) access token.

I didn't found any notice about this in the API Changelog. So is there still a possibility to get the gender+locale of any user with V. 2?

Was it helpful?

Solution

According to the v2.0 documentation for the User object gender and locale fields should both exist and are considered part of the Core API -

If you're not able to fetch those fields with a user access token for that user, it's likely a bug, but it should work OK in both versions

If you're trying to fetch that data for users that don't use your app, that's unsupported as the primary changes in v2.0 are to apps' ability to fetch data about people who don't use the app

OTHER TIPS

see here https://developers.facebook.com/docs/facebook-login/permissions

gender & locale can only be accessed if:

The person queried is the person using the app. The person queried is using the app, and is a friend of the person using the app. The person queried is using the app, is not a friend of the person using the app, but the app includes either an app access token or an appsecret_proof argument with the call.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top