2
Why am I unable to recover this json from the web service of the api I am using.
var url = "https://api.roomorama.com/v1.0/rooms.json?access_token=RS97GGOxoeuo66dXwF4UcHhjmgKjUnAjDiBVDAVTo";
function preenche(){
$.getJSON(url, function(dados){
//log para mostrar quando o getJson funcionou
$('.greeting-thumbnail').append(" 1234");
});
}
CORS problem, you will need to use JSONP, but I do not know if the server accepts... I will look again soon. It may be that others help however.
– Sergio
This issue is recurring here Sopt. Look at this question and its links. In short, you can try to use
jQuery.support.cors = true
or$.get(url, callback, 'jsonp')
, but will depend on server settings.– Andre Figueiredo