adding users to layers
  • Hi, Im having a weird problem regarding adding new users to a layer:

    After I create a public layer from the console, I add a user to it, using the php API. 

    The code snipet would be:

    // make request
    $geoloqi = GeoloqiApi::createWithAccessToken(GEOLOQI_APPLICATION_ACCESS_TOKEN);
    $a = $geoloqi->post('user/create_anon', array(
    'device_id'   => my_device_id,
    'client_secret' => GEOLOQI_API_SECRET,
    'key'       => the_id_of_the_user_in_my_database,
    'client_id' => GEOLOQI_API_KEY,
    'layers_ids'   => layer_id_provided_by_the_create_layer_api

    After that, I open the application, hopeing that when I access the following service, my device/user would show up


    but nothing appears there.

    Could there be a problem with the registration?

    The answer Im getting is:

    object(stdClass)#39 (9) {
      string(9) "Anonymous"
      string(18) "_C3dha1kZAdeue8KM3"
      string(4) "3aeQ"
      string(4) "9428"
      string(46) "bd8ac-b06202b3c51a27079b31c353176b69b06922ccf8"
      string(18) "_qSqg71kZAdehDZTWK"
      object(stdClass)#36 (0) {
    To initialize my device, Im using:

    LQSharedPreferences.setClientId(context, Utils.GEOLOQUI_CLIENT_ID);
    LQSharedPreferences.setClientSecret(context, Utils.GEOLOQUI_CLIENT_SECRET);
    LQSharedPreferences.setSessionInitUserKey(context, userId)
    Intent intent = new Intent(context, LQService.class);

    Do you think there might be something wrong?

    Also, when I ask the api for the users in my app, it gives me an array with the following element:

    "user_id": "3agS",
    "username": "_B39DJ1kZC0vdThcvf",
    "name": "",
    "display_name": "Anonymous",
    "bio": "",
    "website": "",
    "timezone": "UTC",
    "twitter": false,
    "profile_image": "https:\/\/\/geoloqi\/blank-profile-image-blue.png",
    "is_anonymous": 1,
    "has_custom_username": 0,
    "has_push_token": 0,
    "public_location": 0,
    "public_geonotes": 1,
    "public_geonote_email": 1,
    "key": "9437",
    "timezone_offset": "+0000",
    "email": "",
    "extra": {},
    "phone": "",
    "devices": {
    "apns_dev": [],
    "apns_live": [],
    "c2dm": [],
    "gcm": []

    which makes reference to my user. 
    Is it ok that is doesnt have a gcm device?

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!