I’m trying to get the user location from Facebook.
In the Graph API › User page, says:
location : A JSON object containing name and id
I need the location name, and I cannot get it. So far I’ve done:
$loc = $facebook->api('/me', array('fields' => 'location'));
But I don’t get it and don’t know what else to do ..
Thanks a ton!
You’ll need to request the “user_location” privilege.
If you’re using the Login Button, add it to the perms parameter.
If you’re using the Javascript API, add it to the options parameter:
You may also want to try this to see what data is available.