Get user Location/Hometown through Facebook Graph API
Is there a way to get the location/hometown (whichever available) using the facebook graph API?
The catch here is I do not want the user to go through an authentication process, meaning I want to get the location/hometown without having the access_token
Therefore, the following case would be void https://graph.facebook.com/USERID?fields=location,hometown&access_token=USER_ACCESS_TOKEN
access token is required with the following permissions
use hometown_location field of a user table to get location details. We get this info. only if a user shares it's location detail public.
If you have the permissions to access this user data, you just have to parse the key-value dict to your model, eg:
self.user.location = [user objectForKey:@"location"][@"name"];
same for hometown:
self.user.hometown = [user objectForKey:@"hometown"][@"name"];