node-instagram | Instagram API based on promise | REST library
kandi X-RAY | node-instagram Summary
kandi X-RAY | node-instagram Summary
Retrieve media without official instagram api support. (Based on promise).
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of node-instagram
node-instagram Key Features
node-instagram Examples and Code Snippets
Community Discussions
Trending Discussions on node-instagram
QUESTION
I am working with the node-instagram api (javascript). Occasionally, I get errors whenever I make a get request with the api. I want to display a particular error message when an ECONNRESET
exception is raised, and then display a generic error message for all the other types of exception. My code so far looks like this:
ANSWER
Answered 2019-Jun-17 at 17:35I would do Object.keys(err)
in your catch block, to see the keys the error object provides. One of those keys should have the value with details to identify the type of error.
So for EXAMPLE:
QUESTION
How do I associate data returned from instagram API with an existing user account--so that the instagram profile info can be stored in the same document as the user that made the request?
I'm using node.js, Mongoose with MongoDB, and node-instagram from npm to pull in basic user info from instagram. Users on this site will create an account and then later click a button to connect their account to instagram. I'm able to pull in instagram data and store it on my database but I'm not sure how to associate this data with the local (already existing) account that made the request?
...ANSWER
Answered 2019-Feb-22 at 18:41I was able to get this to work by just creating a variable before the await line that gets the user id.
I've added my full code below as well as I neglected to include everything in my original post. Please note that the "/auth/instagram/feed" route is called by instagram (if you are confused about where that is coming from). You have to enter this into their URI redirect when signing up for a new API app.
QUESTION
I'm trying to display the JSON data form instagram's URL: https://www.instagram.com/apple/?__a=1.
If I put this in browser, it shows the JSON, but I want to be able to get it with express so I can attempt to capture any data I need to with that URL
...ANSWER
Answered 2018-Nov-08 at 19:14If you are logged in to instagram in your browser, you are getting authentication via cookies, and everything works fine, but if you are not logged in, the url https://www.instagram.com/apple/?__a=1 responds wit a 403 (access denied) error. This is the case for your back-end code since you are not sending cookies or authentication headers.
You are probably getting an error but not checking for errors in your request callback (the err
parameter).
According to the instagram developer documentation, you need to register your app and authenticate before you can perform the request with OAuth credentials.
Check request's documentation on OAuth signing for more info.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install node-instagram
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page