1

Facebook App - Post New

Hi all,

In Facebook app, when adding a new post, the app show surrounding area name.

This way of sharing place is cool, since it's automatically, and users don't need to choose from a list of venue names like Instagram app.

What is a quick way to get the same result as Facebook app?

KONG
  • 7,271
  • 6
  • 28
  • 27

3 Answers3

1

I've used similar things before through services like google maps api.

https://developers.google.com/maps/

You can pass them a lat and long and get various bits of info back.

I'm not sure if that is now a paid service though. It wasn't when I last used it but I think it changed.

There may be other similar services available.

A more specific page from Google maps api...

https://developers.google.com/maps/documentation/geocoding/#ReverseGeocoding

Fogmeister
  • 76,236
  • 42
  • 207
  • 306
  • Thanks for very nice link. However "Use of the Google Geocoding API is subject to a query limit of 2,500 geolocation requests per day." – KONG Jan 21 '13 at 11:13
  • Just had a read, the limit is 25,000 per day. Not 2,500 per day. If you think you'll be able to get that then you're either very lucky or very good :D You can pay for more if you go over that limit though. – Fogmeister Jan 21 '13 at 11:15
  • 25,000 is "map load", not "geocoding". After more read, found that 2,500 is **per IP**, so should be good. Thanks. http://stackoverflow.com/a/12500404/192800 – KONG Jan 21 '13 at 11:24
  • Ah, that's cool :D couldn't see a separate geocoding usage limit so assumed the same. – Fogmeister Jan 21 '13 at 11:27
1

I found that iOS have a built-in api CLGeocoder, this is more convenient to use than Web API:

- (void)reverseGeocodeLocation:(CLLocation *)location completionHandler:(CLGeocodeCompletionHandler)completionHandler;

This return you CLPlacemark with places, and areas.

http://developer.apple.com/library/ios/#documentation/CoreLocation/Reference/CLPlacemark_class/Reference/Reference.html

KONG
  • 7,271
  • 6
  • 28
  • 27
1

Here's a detailed comparison of all the geolocation solutions - Foursquare, Facebook, Google etc etc - http://crschmidt.net/blog/archives/463/working-with-place-apis-aka-how-i-spent-my-spring-vacation/

But this is actually what you are looking for if you intend to use Facebook Graph APIs for "places" - https://developers.facebook.com/docs/tutorials/ios-sdk-tutorial/show-nearby-places/

Specifically step 3 (https://developers.facebook.com/docs/tutorials/ios-sdk-tutorial/show-nearby-places/#step3)

Now that you have the current location, use it with the FBPlacePickerViewController object to show the place picker when the user taps on the ''Where are you?'' menu option.

Calvin Cheng
  • 35,640
  • 39
  • 116
  • 167
  • Cool. Thanks for a lot more choose Calvin. FBPlacePickerViewController is cool. I will check it in future, when I add function that allow user to choose location. Right now, I just want the UX as simple as posible, location is shown automatically, users don't need to choose from a list. – KONG Jan 22 '13 at 10:11