codingbadger / instant-tokens.com

11 stars 0 forks source link

Unexpected token ':'. Parse error. and Couldn't Find Variable X #4

Closed jimzippy closed 4 years ago

jimzippy commented 4 years ago

Receiving an error "Unexpected token ':'. Parse error." and "Couldn't Find Variable" when adding dynamic "Token" variable to instafeed.js from Instant Tokens Dynamic User URL.

Instagram Tokens Source Returns (Which Errors): {"Token":"auto-generated-instagram-token-here"}

Fix Required: const Token = 'auto-generated-instagram-token-here';

Based on what Steven Schobert is using for the instafeed.js Basic Display API Demo here: https://codepen.io/companionstudio/pen/rNVPGOz

codingbadger commented 4 years ago

I think you are asking for Instant Tokens to set a JS variable instead of returning a JSON repsonse?

If correct, this is has been completed under the issue #2

jimzippy commented 4 years ago

Yes that's correct, when following the current "out of the box" instructions from the instafeed.js website.

I just used the Instant Tokens JSON method you supply via your WIKI and all worked fine. I think instafeed.js needs to update its instructions as there was no reference that using JSON method was needed. It simply states to include the link to the token.

codingbadger commented 4 years ago

@jimzippy This would be something you should raise with the guys who look after instafeed.js

InstantTokens did have instafeed.js in mind (as it was the library I was using at the time) but I am not directly involved with the project.

Thanks!

jimzippy commented 4 years ago

@codingbadger, I will do and thank you. Just FYI on the Instant Tokens website its not showing the "Instagram Username" on the authorisations page at the moment. All other details are displayed.