How to get place_id before registering?

My application allows users to register with the names lat, lon and place to Facebook. But I do not know how to deal with the "place" parameter.

Is there a way to get or create one?

+4
source share
2 answers

Each site you check must have a valid Facebook page.

The place parameter is set to page_id on the Facebook page.

For example, page_id 104999729569954 on the Facebook page http://www.facebook.com/pages/Nanyang-Polytechnic/104999729569954


If your application allows your users to register based on their current location

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

The coordinate set returned from the Google map is different from Facebook’s own coordinate set.

2) To overcome this, make a FQL query to find the closest match between the Facebook coordinates and the Google Map 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 look inside, it can reach 50000 .

3) Now that you have page_id , latitude and longitude . Assign page_id to the place parameter. Assign latitude and longitude to the coordinates parameter. Then you can post the check.

You can refer to published examples of checks that I posted here. Facebook - Posting Checks Using the SDK SDK / JavaScript SDK


If your application allows your users to be tested based on a choice from a list of place names or image galleries (in the game or something else)

You just need to find the page_id each place and associate them with the corresponding place name or image.


Documentation

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

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

+6
source

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

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

+1
source

All Articles