iOS Facebook SDK - getting user location -
By using
I have the correct I need access to this data, and this is where I've been stumped. I have ensured that the information of the user's location is publicly visible, and I sent the Editing - Solution: My Facebook address field was empty I forgot for the 'current city' address. Try to do this: You are currently accessing the property named FBGraphPlace which is giving you an NSString of the location. You want to use the property instead of the location, which is an FBG parachute . This object contains the properties of different components that you want. But I'm not sure this is what you need. FBLoginView , I can log in users and use a
FBGraphUser < / Code> object that holds data in the following structure:
FBGraphUser
| --- Username
| --- email
| --- ID & LT; FBGraphPlace & gt; Location
| --- place_name
| --- ID & lt; FBGraphLocation & gt; Location
| --- city
| --- street
| --- Latitude / Longitude
View Facebook for a better picture :) place_name with the user's
FBGraphPlace location < / Code> but the
FBGraph location is empty.
readPermissions of
FBLoginView to
@ "user_location" Is set to include. Do anyone know where I can make my mistake? Thanks!
id & lt; FBGraphUser & gt; FbUser = (id & lt; FBGraphUser & gt;) user; In the & lt; FBGraphPlace & gt; FB Place = [FBUser Location]; In the & lt; FBGraphLocation & gt; FbLocation = [Fb Place Place]; NSString * userCity = [FBOllocation City]; NSString * userCountry = [FB location country]; NSString * userZip = [FBonation zip];
Comments
Post a Comment