mikefowler / instajam

Instajam is a JavaScript wrapper for the Instagram API. You provide the access token, we provide the jam. Or whatever.
http://mikefowler.github.io/instajam
MIT License
132 stars 33 forks source link

Don't require user authentication #7

Open dsas opened 10 years ago

dsas commented 10 years ago

Instajam always tries to pass an auth token, even if one doesn't exist. It would be nice if authentication was not required - the instagram API does not require it for all calls, the client_id can be passed instead.

A call to API.location.search generates this URL: https://api.instagram.com/v1/locations/search?lat=53.23597&lng=1.42500&access_token=null&callback=instajam140685247595

Ideally if authentication isn't required it should generate this URL: https://api.instagram.com/v1/locations/search?lat=53.23597&lng=-1.42500&callback=instajam140685247595&client_id=xxxxxx

mikefowler commented 10 years ago

Thanks for the note, @dsas. I've been addressing this flaw over in the multiple-instances branch. It's also a full-rewrite, albeit with the same API. It's mostly fully functioning, just pending additional tests to be written. Take a look and see if it suits your needs. Note that the documentation in the README hasn't been updated in that branch yet, but all the source files are here.

EDIT: Have a look at the tests to see how the initialization should be done now.

dsas commented 10 years ago

@mikefowler sorry for the slow response, I've had a quick try and it seems perfect, thanks.