So far I have tried:
$facebook->api('/me', 'get', array("fields"=>"location"));
Which returns:
Array ( [location] => Array ( [id] => 107847249250173 [name] => Cambridge, Cambridgeshire ) [id] => 1234567890 )
If I have the necessary permissions, how could I echo just the [name] bit (so the output is “Cambridge, Cambridgeshire”) in a format that could be inserted into a database?
1 Answer