1

With the javascript sdk (FB.api), I cannot checkin on behalf of user. (The user has granted publish_stream permission to my app)

Since facebook's API keeps changing, confused for some time. After searching and reading from internet, I think it's the right way to publish a checkin. Any help is appreciated.

var params = {
method: 'POST',
place: 107297282684980,
message: 'hi',
coordinates: {
'latitude': 22.204284439454,
'longitude': 113.54313260065
}};

FB.api(
'/me/checkins',
params,
function(response) {
if( response )
alert('Checkin Completed!');
});
Kent Si
  • 11
  • 3
  • Feedback from facebook support told me that it was deprecated at July 2013. ================================= This is not a bug but is in fact by design and is intended for this call. This endpoint was deprecated back in July as part of one of our breaking changes. You can get more info on this at: https://developers.facebook.com/roadmap/completed-changes/ This also matches our documentation and you can get more information on this at: https://developers.facebook.com/docs/reference/api/checkin/ "Publishing a Checkin object is deprecated in favor of creating a Post with a location attached." – Kent Si Dec 17 '13 at 03:38

2 Answers2

0

It was deprecated at July 2013. You should check the changes from the URLs provided at the question comment.

And follow the instructions:

https://developers.facebook.com/docs/opengraph/overview/ https://developers.facebook.com/docs/opengraph/getting-started/

Kent Si
  • 11
  • 3
0

As FB Check-In is deprecated we can achieve the same thing with a post on FB with Location Attached using the following FB Graph Api post.

FB.api('/me/feed', 'post', {
    name: 'SomeName',
    message: 'SomeMessage',
    place: yourLocationID
}, function (response) {}); 

Note : Where yourLocationID is the ID that you will get by the Graph search using https://graph.facebook.com/search?q=yourPlaceName&type=page&access_token=YOURTOKEN

jafarbtech
  • 6,842
  • 1
  • 36
  • 55