Instafeed.js: Option 'accessToken' is not needed when getting user feed

Created on 12 Mar 2015  Â·  22Comments  Â·  Source: stevenschobert/instafeed.js

Instagram user's recent feed can be fetched without accessToken if clientId is provided, but your script throws an error if accessToken is not provided. I commented rows 225-227 and it works perfectly ( https://github.com/stevenschobert/instafeed.js/blob/master/instafeed.js ).

https://api.instagram.com/v1/users/{user-id}/media/recent/?client_id=YOUR-CLIENT_ID

Most helpful comment

@samisiuvatti Hi, does this still work as of now? Doing this returns page Not Found for me: https://api.instagram.com/v1/users/{user-id}/media/recent/?client_id=YOUR-CLIENT_ID

This returned 400 for me:

The access_token provided is invalid.

According to the docs, it requires an Access Token.

All 22 comments

This worked for me also.

I tried commenting those lines, but still get the same error. ANy help?

@knauso I've created a fork and branch that has both AMD support added and accessToken check disabled, maybe it is helpful for you too? https://github.com/SC5/instafeed.js/tree/amd-access

Great! So i can just grab the minimized js file and everything will work?

On Wednesday, June 3, 2015, Juha Mustonen [email protected] wrote:

@knauso https://github.com/knauso I've created a fork and branch that
has both AMD support added and accessToken check disabled, maybe it is
helpful for you too? https://github.com/SC5/instafeed.js/tree/amd-access

—
Reply to this email directly or view it on GitHub
https://github.com/stevenschobert/instafeed.js/issues/242#issuecomment-108545858
.

Ognjen Knaus
Skype: KnausO
Gtalk: [email protected]


This e-mail is confidential and may also contain privileged information. If
you are not the intended recipient, you are not authorized to read, print,
save, process or disclose this message. If you have received this message
by mistake, please inform the sender immediately and delete this e-mail,
its attachments and any copies. Thank you!

Well, it did work for me :) In a case it doesn't, maybe we're initializing it differently.

Thanks! Will try it in the morning :)

On Wednesday, June 3, 2015, Juha Mustonen [email protected] wrote:

Well, it did work for me :) In a case it doesn't, maybe we're initializing
it differently.

—
Reply to this email directly or view it on GitHub
https://github.com/stevenschobert/instafeed.js/issues/242#issuecomment-108580285
.

Ognjen Knaus
Skype: KnausO
Gtalk: [email protected]


This e-mail is confidential and may also contain privileged information. If
you are not the intended recipient, you are not authorized to read, print,
save, process or disclose this message. If you have received this message
by mistake, please inform the sender immediately and delete this e-mail,
its attachments and any copies. Thank you!

It is still giving me Unexpected token

I am initializing it like this, actually if I understand well, accessToken can be removed, but not working with or without it :

<script type="text/javascript">
    var userFeed = new Instafeed({
        get: 'user',
        userId: '52861563',
        accessToken: '52861563.7d93cc0.e101f4afc56a4ea1af9f7cd678ee5807'
    });
    userFeed.run();

"Instagram user's recent feed can be fetched without accessToken if clientId is provided"

You would still need clientId, if you removed accessToken

Yes, I left the userID

Not userID but clientID. It's a different thing.

So is this the proper setting?
Can get it to work. still got " Unexpected token" error in console

<script type="text/javascript">
    var userFeed = new Instafeed({
        get: 'user',
        clientId: '7d93cc0de3b7417497923c1fdb5a7cfe'
    });
    userFeed.run();

I am using this js:
https://raw.githubusercontent.com/SC5/instafeed.js/amd-access/instafeed.min.js

@knauso You need _both_ userId and clientId:

var userFeed = new Instafeed({
  get: 'user',
  // Instagram user id you want to list images from
  userId: 1549781111, 
  // Your client id registered in Instagram developer site
  clientId: '2e5a3f8cc1754723a81d216f3d302a69'
});

Working! :)

thanks so much for the help. really appreciate it, you are da man!

Hi,
Don't work for me on my local serveur mamp... is't normal ?

var userFeed = new Instafeed({
    get: 'user',
    userId: 1030277,
    clientId:'323195e2be5432dfb9103d13fe5a0281',
    resolution: 'standard_resolution', 
    limit:'6',
    template: '<li class="instagram__item"><a target="_blank" href="{{link}}"><img class="instagram__image" alt="Instagram Image" src="{{image}}"/></a></li>'
});
userFeed.run();

It's work on jsfiddle.net but not in local...

@samisiuvatti Hi, does this still work as of now? Doing this returns page Not Found for me: https://api.instagram.com/v1/users/{user-id}/media/recent/?client_id=YOUR-CLIENT_ID

@wleofeng Yes it should still work. That url is not supposed to work as it's just Instagram's API endpoint. You may get acquainted to that part of API here: https://www.instagram.com/developer/endpoints/users/#get_users_media_recent

@wleofeng This seems to be fixed in the new releases.

@juhamust Hi! I've been using your version of this plugin(without acess token) for some time.
But now it stoped working. Any idea why?

@fabioguina based on quick look into Instagram API documentation, they've introduced a new review policy that might have something to do with it. https://www.instagram.com/developer/endpoints/

Any app created before Nov 17, 2015 will continue to function until June 1, 2016. On that date, the app will automatically be moved to Sandbox Mode if it wasn't approved through the review process. The previous version of our documentation is still available here.

Also, the API might have changed itself.

@juhamust Thanks for the reply.
The documentation says that no longer support making requests using just the client_id. I was afraid that was something like that. Looks like i'm gonna have to use the official version of the plugin.
I appreciate your help.

@samisiuvatti Hi, does this still work as of now? Doing this returns page Not Found for me: https://api.instagram.com/v1/users/{user-id}/media/recent/?client_id=YOUR-CLIENT_ID

This returned 400 for me:

The access_token provided is invalid.

According to the docs, it requires an Access Token.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

josiahwiebe picture josiahwiebe  Â·  5Comments

joshmeares picture joshmeares  Â·  9Comments

heymATIN picture heymATIN  Â·  4Comments

stevenschobert picture stevenschobert  Â·  8Comments

benmartineau picture benmartineau  Â·  6Comments