Answer the question
In order to leave comments, you need to log in
How to add a request to vk api to an existing strategy?
There is a strategy:
passport.use('vk', new AuthVKStrategy({
clientID: config.get("auth:vk:app_id"),
clientSecret: config.get("auth:vk:secret"),
callbackURL: config.get("app:url") + "/auth/vk/callback"
},
function (accessToken, refreshToken, profile, done) {
return done(null, {
username: profile.displayName,
photoUrl: profile.photos[0].value,
profileUrl: profile.profileUrl
});
}
));
https://api.vk.com/method/friends.get?user_id=some_id&order=random&count=5&access_token=ACCESS_TOKEN&v=5.64
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question