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

Option 'accessToken' is not needed when getting user feed #242

Closed
samisiuvatti opened this issue Mar 12, 2015 · 22 comments
Closed

Option 'accessToken' is not needed when getting user feed #242

samisiuvatti opened this issue Mar 12, 2015 · 22 comments

Comments

@samisiuvatti
Copy link

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

@303Michael
Copy link

This worked for me also.

juhamust added a commit to SC5/instafeed.js that referenced this issue May 26, 2015
@knauso
Copy link

knauso commented Jun 3, 2015

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

@juhamust
Copy link
Contributor

juhamust commented Jun 3, 2015

@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

@knauso
Copy link

knauso commented Jun 3, 2015

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

On Wednesday, June 3, 2015, Juha Mustonen notifications@github.com 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
#242 (comment)
.

Ognjen Knaus
Skype: KnausO
Gtalk: ognjenknaus@gmail.com


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!

@juhamust
Copy link
Contributor

juhamust commented Jun 3, 2015

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

@knauso
Copy link

knauso commented Jun 3, 2015

Thanks! Will try it in the morning :)

On Wednesday, June 3, 2015, Juha Mustonen notifications@github.com 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
#242 (comment)
.

Ognjen Knaus
Skype: KnausO
Gtalk: ognjenknaus@gmail.com


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!

@knauso
Copy link

knauso commented Jun 4, 2015

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();

@samisiuvatti
Copy link
Author

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

You would still need clientId, if you removed accessToken

@knauso
Copy link

knauso commented Jun 4, 2015

Yes, I left the userID

@samisiuvatti
Copy link
Author

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

@knauso
Copy link

knauso commented Jun 4, 2015

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

@juhamust
Copy link
Contributor

juhamust commented Jun 4, 2015

@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'
});

@knauso
Copy link

knauso commented Jun 4, 2015

Working! :)

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

@julesfromparis
Copy link

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();

@julesfromparis
Copy link

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

@wleofeng
Copy link

@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

@samisiuvatti
Copy link
Author

@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

@samisiuvatti
Copy link
Author

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

@fabioguina
Copy link

@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?

@juhamust
Copy link
Contributor

juhamust commented Jun 4, 2016

@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.

@fabioguina
Copy link

@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.

@georgeu2000
Copy link

@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.

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

8 participants