Answer the question
In order to leave comments, you need to log in
How to make a request from Angular to VK API?
Good afternoon!
Interested in the following question. How to make a request to the VK API using the $http service. Here's how I do it:
$http.jsonp(VkontakteUtils.buildVKMethodUrl('groups.getById'), {
method: 'GET'
})
Uncaught SyntaxError: Unexpected token : groups.getById?group_id=python_programing:formatted:1
Answer the question
In order to leave comments, you need to log in
The solution was found. If anyone needs:
$http.jsonp(VkontakteUtils.buildVKMethodUrl('groups.getById'), {
method: 'GET',
params: {
callback: 'JSON_CALLBACK'
}
})
Good afternoon.
Can you tell me how you signed up? I want to make a similar request, from a separate site that will not be embedded in the iFrame VK. Is it suitable for such purposes:
VK.init({
apiId: id
});
?
Or should another method be used?
Sorry if the question is a bit off topic.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question