Checkins query

You must Login before you can answer or comment on any questions.

Hello everyone,

I'm developing Android app which uses the ACS Checkins object.

I need to get all Checkins made for a certain Place object.

Here is my code:

public static void QueryCheckIn()
    {
 
        Map<String, Object> data = new HashMap<String, Object>();
 
        data.put("where", "{'place_id':'503743a670b0f44141050682'}");
 
        CCResponse response = null;
        try {
             response = sdk.sendRequest("checkins/query.json", CCRequestMethod.GET, data);
        } catch (IOException e1) {
            // TODO Auto-generated catch block
            e1.printStackTrace();
        } catch (CocoafishError e1) {
            // TODO Auto-generated catch block
            e1.printStackTrace();
        }
 
        JSONObject responseJSON = response.getResponseData();
 
    }
Unfortunetly,

I get this error in the json response:

Error: 745: unexpected token at '{'place_id':'503743a670b0f44141050682'}'

What am I doing wrong?

Thanks!

1 Answer

Accepted Answer

please try it: data.put("where", "{\"place_id\":\"503743a670b0f44141050682\"}");

Your Answer

Think you can help? Login to answer this question!