Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to fetch user profile #22

Open
RamanButtar1 opened this issue May 17, 2018 · 6 comments
Open

Failed to fetch user profile #22

RamanButtar1 opened this issue May 17, 2018 · 6 comments

Comments

@RamanButtar1
Copy link

RamanButtar1 commented May 17, 2018

this._oauth2.get('https://api.instagram.com/v1/users/self', accessToken, function (err, body, res) {
if (err) { return done(new InternalOAuthError('failed to fetch user profile', err));

Getting this error from last 2 days, is it instagram end issue?

@kantharia
Copy link

I am also getting the same error on one of my previous project, It was working earlier

@rafipiccolo
Copy link

+1

@rafipiccolo
Copy link

rafipiccolo commented Feb 11, 2020

the url is not valid anymore... plus it doesnt return so much data now...

i corrected it with :

this._oauth2.get('https://graph.instagram.com/me?fields=id,username', accessToken, function (err, body, res) {
    
    if (err) { return done(new InternalOAuthError('failed to fetch user profile', err)); }
    
    try {
      var json = JSON.parse(body);
      
      var profile = { provider: 'instagram' };
      profile.id = json.id;
      profile.username = json.username;
     
      profile._raw = body;
      profile._json = json;
      
      done(null, profile);
    } catch(e) {
      done(e);
    }
  });

@geduldig
Copy link

geduldig commented Apr 4, 2021

Any reason why this fix has not been added to the main code?

davehallonline added a commit to davehallonline/taketagprint that referenced this issue Apr 13, 2021
Related to this issue jaredhanson/passport-instagram#22 the original repo is out of date and not been maintained
@uranium93
Copy link

use this package instead

https://www.npmjs.com/package/passport-instagram-basic-api

@Jashan66
Copy link

the url is not valid anymore... plus it doesnt return so much data now...

i corrected it with :

this._oauth2.get('https://graph.instagram.com/me?fields=id,username', accessToken, function (err, body, res) {
    
    if (err) { return done(new InternalOAuthError('failed to fetch user profile', err)); }
    
    try {
      var json = JSON.parse(body);
      
      var profile = { provider: 'instagram' };
      profile.id = json.id;
      profile.username = json.username;
     
      profile._raw = body;
      profile._json = json;
      
      done(null, profile);
    } catch(e) {
      done(e);
    }
  });

does this code replace the passport instagram strategy code or is it add inside or apart from that code ? Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants