Facebook Checkin using Graph API in Android

509 Views Asked by At

I would like to check-in into Facebook using graph API(Or what ever method available), I have latitude and longitude of the place, please anyone help me in addressing following questions.

1) Which permission is required for getting place_id and for check-in?

(I am currently using "publish_actions")

2) I have Latitude and Longitude, how can i get the place_id using latest 2.6 graph API?

(I tried using GraphRequest with "q/fql" as graph path and

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

as bundle query.

3) With the place_id, lat, and lon values, how can i checkin?

(I tried using following code to checkin with dummy place_id, lat and lon values)

Bundle params = new Bundle();
params.putString("access_token", "ACCESS TOKEN");
params.putString("place", "203682879660695");  // PLACE ID
params.putString("message","I m here in this place");
JSONObject coordinates = new JSONObject();
coordinates.put("latitude", "LATITUDE");
coordinates.put("longitude", "LONGITUDE");
params.putString("coordinates",coordinates.toString());
params.putString("tags", "xxxx");//where xx indicates the User Id
String response = faceBook.request("me/checkins", params, "POST");

But still with all the approaches, i am not able to find the place_id and check-in to Facebook using latest 2.6 graph API in Android.

0

There are 0 best solutions below