Facebook Graph API: user gender

前端 未结 4 1741
遥遥无期
遥遥无期 2021-01-02 01:34

The old Facebook API provided the user sex/gender as part of the default user data. Apparently the new Graph API does not provide that information, even though the document

4条回答
  •  失恋的感觉
    2021-01-02 01:36

    I see this has an open bounty even though the question is really really old.

    You can get the gender of any user using Open Graph even without any access_token.

    GET https://graph.facebook.com/userid
    json_decode the data
    gender will be in the `gender` element of the returned array.
    

    EDIT : user location, hometown, country etc are no more there in the /me. seems like Fb removed those, even if they are public.

    Hope this helps

提交回复
热议问题