From 244152a6191fde94fdeee2d0a31641f6dc758de4 Mon Sep 17 00:00:00 2001 From: Sahat Yalkabov Date: Wed, 30 Apr 2014 00:17:28 -0400 Subject: [PATCH] Fixed instagram API token issue Fixes #141 --- controllers/api.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/controllers/api.js b/controllers/api.js index 5c0bf70531..908c5031da 100644 --- a/controllers/api.js +++ b/controllers/api.js @@ -510,8 +510,8 @@ exports.getLinkedin = function(req, res, next) { exports.getInstagram = function(req, res, next) { var token = _.findWhere(req.user.tokens, { kind: 'instagram' }); - ig.use({ access_token: token }); ig.use({ client_id: secrets.instagram.clientID, client_secret: secrets.instagram.clientSecret }); + ig.use({ access_token: token.accessToken }); async.parallel({ searchByUsername: function(done) { @@ -531,7 +531,6 @@ exports.getInstagram = function(req, res, next) { }, myRecentMedia: function(done) { ig.user_self_media_recent(function(err, medias, pagination, limit) { - console.log(medias) done(err, medias); }); }