Skip to content

Instantly share code, notes, and snippets.

@patrickarlt
Created December 11, 2012 16:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save patrickarlt/9308c191ffea95b445bd to your computer and use it in GitHub Desktop.
Save patrickarlt/9308c191ffea95b445bd to your computer and use it in GitHub Desktop.
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