Instagram API未定义图像提示(Node.Js)

时间:2018-12-20 15:46:13

标签: javascript node.js instagram

我无法获取Instagram API的图片链接。 登录时,出现“未定义”

我使用Node.JS和以下API: https://github.com/huttarichard/instagram-private-api

var Client = require('instagram-private-api').V1;
var device = new Client.Device('xxx');
var storage = new Client.CookieFileStorage(__dirname + '/cookies/someuser.json');
var _ = require('lodash');
var Promise = require('bluebird');

Client.Session.create(device, storage, 'xxxxxusername***', '*****passwordxxxx')
    .then(function(session) {
    var accountId = '976677053'
    var feed = new Client.Feed.UserMedia(session, accountId);
    Promise.mapSeries(_.range(0, 20), function() {
      return feed.get();
    })
    .then(function(results) { var media = _.flatten(results); console.log(media) })
    });

0 个答案:

没有答案