4

My app lets users checkin with lat, lon and place name to Facebook. But I don't know how to deal with "place" parameter.

Is there any way to get or create one?

Hartok
  • 2,147
  • 20
  • 37
Shisoft
  • 4,197
  • 7
  • 44
  • 61

2 Answers2

6

Each checkinable place must have a valid Place Facebook Page.

The place parameter takes in the page_id of a Place Facebook Page.

For example, page_id 104999729569954 of Place Facebook Page http://www.facebook.com/pages/Nanyang-Polytechnic/104999729569954


If your application is letting your users to checkin based on their current location

1) Use an external map service such as Google Map's Geolocation to get the coordinates(lat & lon) of your user's current location.

The set of coordinates returned from Google Map is different from Facebook's own set of coordinates.

2) To overcome this, do a FQL query to find the closest match of Facebook's coordinates with Google Map's coordinates.

SELECT page_id,latitude,longitude FROM place WHERE distance(latitude, longitude, "LAT_HERE", "LON_HERE") < 250

250 refers to the radius(m) that it will search within, it can go up to 50000.

3) Now that you have page_id, latitude and longitude. Assign page_id into place parameter. Assign latitude and longitude into coordinates parameter. You will then be able to publish checkin.

You can refer to publish checkin examples that I have posted over here. Facebook - Publish Checkins using PHP SDK/JavaScript SDK


If your application is letting your users to checkin based on selection from a list of place names or gallery of images (in a game or something)

You will just need to find the page_id of each place and bind them to respective place name or image.


Documentation

Page FQL - http://developers.facebook.com/docs/reference/fql/page/

Checkins API - http://developers.facebook.com/docs/reference/api/user/#checkins

Community
  • 1
  • 1
Mysophobe
  • 622
  • 2
  • 10
  • 33
1

Maybe this is what you want. Open graph explorer Just replace URL with any facebook page url

fql?q=SELECT id FROM object_url WHERE url="https://www.facebook.com/LegendCinema"

sovanlandy
  • 1,700
  • 2
  • 19
  • 24