sromku / android-simple-facebook

[Deprecated] Simple Facebook SDK for Android
Other
879 stars 349 forks source link

Update Profile to use IdName for hometown and location fields. #383

Closed xsorifc28 closed 9 years ago

xsorifc28 commented 9 years ago

Since the Graph API only returns Id and name for a users current location and hometown, I think it makes sense to use just the IdName object.

This also solves the issue of "Location" being misleading (Since it extended IdName & had physical location info).

Hometown is also not used anymore, and probably not required.

To get more info about a user's hometown or location, you must use GetPage with getProfile().getHometown().getId() or getProfile().getLocation().getId().

Also attempting to fix an issue with U.S. zip codes, since they can contain strings. Some Facebook places have a "NNNN-NNNN", ZIP+4 zip code, and parsing this as an integer causes an exception.

sromku commented 9 years ago

@xsorifc28 Great fixes. I think that if Hometown is not referenced by any other classes, then it worth deleting it at all. wdyt?

xsorifc28 commented 9 years ago

@sromku I deprecated it, but I agree; it can be deleted.

sromku commented 9 years ago

@xsorifc28 can you delete and update the PR? I will merge it after. Much thanks!

xsorifc28 commented 9 years ago

@sromku Deleted.

sromku commented 9 years ago

@xsorifc28 Great work! Much thanks and very appreciated!