How to use the instagram-private-api.V1.Upload function in instagram-private-api

To help you get started, we’ve selected a few instagram-private-api examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github soixantecircuits / altruist / actions / instagram.js View on Github external
.then((session) => {
          Client.Upload.photo(session, options.media)
            .then((upload) => {
              console.log('Uploading ' + path.basename(options.media))
              return Client.Media.configurePhoto(session, upload.params.uploadId, options.caption)
            })
            .then((response) => resolve('Success'))
            .catch((err) => reject(new Error(JSON.stringify({
              err: err.name,
              details: err.message
            }))))
        })
    })
github igdmapps / igdm / main / instagram.js View on Github external
return new Promise((resolve, reject) => {
    Client.Upload.photo(session, filePath)
      .then(function (upload) {
        Client.Thread.configurePhoto(session, recipients, upload.params.uploadId)
          .then(resolve).catch(reject);
      }).catch(reject);
  })
}