Ejemplo n.º 1
0
 function(tokenParams)
 {
     console.log("VK_AUTH_TOKEN_GET");
     vk.setToken(tokenParams.access_token);
     vk.request('users.get', {'user_id' : tokenParams.user_id}, 
                function(data) 
             {
                 console.log("VK_REQUEST_DATA");
                 console.log(data);
                 if (data.response.length) {
                     resolve(data.response[0].first_name + '_' + data.response[0].last_name);
                 } else {
                     reject("Assertion Failed data.response.length must be > 0");
                 }
             });
 });
Ejemplo n.º 2
0
Archivo: wp.js Proyecto: ityn/_vk_amd
// Setup
var VK = require('vksdk');
var vk = new VK({
    'appId'     : 5080342,
    'appSecret' : 'gaMQGLcOVBXwPBKGSSnD',
    'language'  : 'ru',
    'v': '5.52'
});

var access_token = "bc8d314f5dbb52269398891560095b7302f4471f84ae402f5981a55f3a3047e44cc5493aea10e653bc5cc";
var u_id = 88567346;
var club1 = -72688782;
var club2 = -100659116;
var scope = 337026;
vk.setSecureRequests(true);
vk.setToken(access_token);

// Request 'users.get' method

// Setup server access token for server API methods
//vk.on('serverTokenReady', function(_o) {
//    // Here will be server access token
//    console.log(_o.access_token);
//    vk.setToken(_o.access_token);
//});
//
//// Turn on requests with access tokens
//vk.setSecureRequests(true);
//https://api.vk.com/method//wall.post?owner_id=-100659116&message=TEST#&v=5.52&access_token=b27813b3256e60152929a322de2321ce3e8e98ab6053089b5124b188e36b6d23cbb272891a92ddca30baa
/* GET users listing. */
router.get('/wall_post', function(req, res, next) {
Ejemplo n.º 3
0
 vk.on('serverTokenReady', function(_o) {
     vk.setToken(_o);
 });