How to retrieve user country using facebook Graph API?

前端 未结 4 1148
南旧
南旧 2020-12-30 03:13

I want to retrieve the logged in user country, and insert it into a div. I succeed making it with the user Name, Gender and Age range, but somewhy I can\'t retrieve the coun

4条回答
  •  我在风中等你
    2020-12-30 03:36

    Fields in Fb API are now concatenable, so, for a detailed info of User's location you need:

    scope="public_profile,user_location"
    
    fields="name,location{location{country, country_code, city, city_id, latitude, longitude, region, region_id, state, street, name}}"
    

提交回复
热议问题