lib/vkoauth2.js
function VKOAuth2(appId, appSecret, redirectURL, fullSettings) {

    this._appId = appId;
    this._appSecret = appSecret;
    this._redirectURL = redirectURL;

    fullSettings = fullSettings || {};

    this._vkOpts = fullSettings.settings || {};
    this._apiVersion = this._vkOpts.version || '5.41';
    this._dialogOptions = this._vkOpts.dialog || {};

    this._fields = fullSettings.fieldMap ? _.values(fullSettings.fieldMap) : [];

    this._fields = _.unique(this._fields.concat(['uid', 'first_name', 'last_name', 'screen_name']));

    this._authURL = 'https://oauth.vk.com/authorize';
    this._accessTokenURI = 'https://oauth.vk.com/access_token';

    this._profileURI = 'https://api.vk.com/method/users.get';
}
function VKOAuth2(appId, appSecret, redirectURL, fullSettings) {

    this._appId = appId;
    this._appSecret = appSecret;
    this._redirectURL = redirectURL;

    fullSettings = fullSettings || {};

    this._vkOpts = fullSettings.settings || {};
    this._apiVersion = this._vkOpts.version || '5.41';
    this._dialogOptions = this._vkOpts.dialog || {};

    this._fields = fullSettings.fieldMap ? _.values(fullSettings.fieldMap) : [];

    this._fields = _.unique(this._fields.concat(['uid', 'first_name', 'last_name', 'screen_name']));

    this._authURL = 'https://oauth.vk.com/authorize';
    this._accessTokenURI = 'https://oauth.vk.com/access_token';

    this._profileURI = 'https://api.vk.com/method/users.get';
}
function VKOAuth2 ( appId , appSecret , redirectURL , fullSettings ) { this . _appId = appId ; this . _appSecret = appSecret ; this . _redirectURL = redirectURL ; fullSettings = fullSettings || { } ; this . _vkOpts = fullSettings . settings || { } ; this . _apiVersion = this . _vkOpts . version || '5.41' ; this . _dialogOptions = this . _vkOpts . dialog || { } ; this . _fields = fullSettings . fieldMap ? _ . values ( fullSettings . fieldMap ) : [ ] ; this . _fields = _ . unique ( this . _fields . concat ( [ 'uid' , 'first_name' , 'last_name' , 'screen_name' ] ) ) ; this . _authURL = 'https://oauth.vk.com/authorize' ; this . _accessTokenURI = 'https://oauth.vk.com/access_token' ; this . _profileURI = 'https://api.vk.com/method/users.get' ; }
vkontakte OAuth2 object, make various requests
the graphAPI

@param {string} appId     the vkontakte app id
@param {string} appSecret the vkontakte app secret
@param {string} redirectURL  the url vkontakte should use as a callback
vkontakte OAuth2 object make various requests the graphAPI