-1

I looking for a way to add "Place" button to my website to allow visitors to checkin directly from it. is there any possibility to do that using JavaScript SDK, as popup? Thank you in advance.

Vinh VO
  • 705
  • 1
  • 7
  • 28
rellu
  • 15
  • 1
  • 7

1 Answers1

1

You can do it, publishing checkins is documented here https://developers.facebook.com/docs/reference/api/#publishing. In order for this to work you need to:

  1. Authenticate your user, using JS SDK (https://developers.facebook.com/docs/authentication/)
  2. Ask for publish_checkins extended permission (https://developers.facebook.com/docs/authentication/permissions/)
  3. Issue a POST request onClick, something functionally similar to this https://graph.facebook.com/me/checkins?coordinates=%7B%22latitude%22%3A+37.383633343607%2C%22longitude%22%3A+-5.9910216821167%7D&place=298525916826786&message=you+funny+lion+at+the+door&method=post&access_token=USER_TOKEN, of course if using the JS SDK makes sense to use the FB.api() method for this (https://developers.facebook.com/docs/reference/javascript/FB.api/).
Arjuna Del Toso
  • 579
  • 3
  • 13
  • Well, I created already a script that publish checkins on the wall, I described it here: http://facebook.stackoverflow.com/questions/11827833/checkin-on-facebook-through-popup-window But what I would like to implement is to allow user to choose the location where he will checkin. In method above, places are predefined. To understand what I trying to do, is to have a dialog box on website, similar with that from facebook. ps"sorry for my English." . – rellu Aug 09 '12 at 13:47
  • 1
    Can't you simply search for the places https://graph.facebook.com/search?q=coffee&type=place&access_token=TOKEN and feed the checkin details from that (doc here https://developers.facebook.com/docs/reference/api/#searching). – Arjuna Del Toso Aug 09 '12 at 14:29
  • wish I knew how to do that :D Thank you a lot ! – rellu Aug 10 '12 at 06:47