There is an error while getting an "Object" of a User while running in a Web App hosted on a server, though it works if the App is running from my computer.
sdk.sendRequest('objects/status/query.json', URLRequestMethod.GET, data, getObjConfirmation);
works fine while debugging from my computer, though it returns nothing if it's hosted on a server.
3 Answers
Hello Aaron,
Thanks for inquiring. So on creation complete of the App, the below code gets called:
public var sdk:Cocoafish = new Cocoafish('API long alphanumeric');
onCreationComplete():void { var data:Object = {}; sdk.sendRequest('objects/status/query.json', URLRequestMethod.GET, data, true, getStatus); }then once that requests happens, getStatus fires:
private function getStatus(data:Object):void { if(data) { if(data.hasOwnProperty("meta")) { var meta:Object = data.meta; if(meta.status == "ok" && meta.code == 200) { // we have access to the status Object trace(data.response.status[0].locations); ...This works fine while running (debugging) locally, but once I host this on my server, it stops working. I assume it may have cross-domain issues, because only when it's hosted on a server that the call dosen't get through.
Solved: For it to work in Web
sdk.sendRequest('objects/status/query.json', URLRequestMethod.GET, data, false, getStatus);// 4th param should be false, not true
We have built multiple applications using ACS on mobile and in websites, can you provide a complete example with a use case where it is failing?
Your Answer
This question has been locked and cannot accept new answers.