-
-
Save patrickarlt/9308c191ffea95b445bd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
geoloqi.init({ | |
clientId: "Your application client_id", | |
clientSecret: "", | |
trackingProfile: "PASSIVE", | |
},{ | |
onSuccess: function(){ | |
// geloqi init will automatically create a user for you so lets subscribe the user to the one layer | |
Ti.API.info("Tracking Profile: " + geoloqi.tracker.getProfile()); | |
Ti.API.info("Access Token: " + geoloqi.session.getAccessToken()); | |
Ti.API.info("User ID: " + geoloqi.session.getUserId()); | |
Ti.API.info("Username: " + geoloqi.session.getUsername()); | |
Ti.API.info("Anonymous?: " + geoloqi.session.isAnonymous()); | |
geoloqi.session.postRequest("layer/subscribe/YOUR_LAYER_ID", {}, { | |
onSuccess: function(data){ | |
Ti.API.info(data); | |
}, | |
onFailure: function(data){ | |
Ti.API.error(data); | |
} | |
}); | |
}, | |
onFailure: function(){ | |
Ti.API.error("Geoloqi Config Failed"); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment