I am trying this in the graph explorer with my account: https://developers.facebook.com/tools/explorer/?method=GET&path=me
I added to the token all the possibly related permissions. It shows me many info but any location. On my Facebook profile I don't have a hometown but I have the current location, and my friends can see it too. It says I live in *. I couldn't find any privacy settings where I could have set not to show it to any app.
Thanks!
It was a bit tricky, till I found that hometown and location are stored as single-dimensional array in response data. Try the code below:
FB.api('/me', function(response) {
console.log(response.hometown.name);
console.log(response.location.name);
});
This should work.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With