I
I
ixon2014-04-02 08:45:23
JavaScript
ixon, 2014-04-02 08:45:23

How to implement POST or GET requests to vk api via javascript & jquery?

You need to implement POST or GET requests to h ttps://api.vk.com/method/users.get?access_token=Se... using javascript and jquery and get a response in JSON format.

How can I do it?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
ixon, 2014-04-02
@ixon

var req="https://api.vk.com/method/users.get?access_token=СекретныйТокен"
$.ajax({
    url : req,
    type : "GET",
    dataType : "jsonp",
    success : function(msg){
    console.log(msg.response[0]);
    }
});

F
fAra0N25, 2014-04-02
@fAra0N25

You need to use openapi from VK developers. It describes the scheme for obtaining a token and also describes how to make requests to the api.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question