Answer the question
In order to leave comments, you need to log in
Undefined in all parameters why?
Again, because of my carelessness, I make mistakes somewhere, there is a code
<script type="text/javascript">
VK.init({
apiId: 5135424
});
function recommendate(){
VK.Api.call('audio.getRecommendations', {}, function(r) {
if(r.response) {
$('#playlist').append('<li><a href="'+r.response.url+'"><b><'+r.response.artist+'></b> - '+r.response.title+'<span class="label"><'+r.response.aid+'></span></a></li>')
}
});
};
</script>
Answer the question
In order to leave comments, you need to log in
"response":[{}]
r.response contains an array of objects, and you are trying to work with it as if it were an object.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question