Wanderlust-response

Can anyone help with the Wanderlust project in the Introduction to Javascript course?
Wanderlust

I have got to step 13 and have created developer accounts in foursquare and APIXU. When I look at the response in the javascript console and copy and paste the URL into a new browser window I get the message

{“meta”:{“code”:400,“errorType”:“invalid_auth”,“errorDetail”:“Missing access credentials. See https://developer.foursquare.com/docs/api/configuration/authentication for details.”,“requestId”:“5c721b024c1f67634bed46ba”},“response”:{}}

rather than all the code necessary for me to view the object. It is obviously something to do with my foursquare registration but I can’t figure out what. I have the client ID and secret provided.

When I registered it asked for an App URL-perhaps this is wrong. I have tried using

https://www.codecademy.com/courses/introduction-to-javascript/projects/wanderlust
for the app url and also
https://api.foursquare.com/v2/venues/explore
on both occasions the response was the same.

Can anyone advise me?
Thanks

I have now figured this out!
In the javascript console I was copying and pasting the first URL which didnt work however the second url below did! Not sure why as in the video walkthrough he copied the first url!

Response {type: “cors”, url: “https://api.foursquare.com/v2/venues/explore?near=…C03M5OFNTNEMR2ARFCX4YQOUYG3CDZ12WDVXMU&v=20180224”, redirected: false, status: 200, ok: true, …}
main.js:24 Fetch finished loading: GET "https://api.foursquare.com/v2/venues/explore?near=columbus&limit=10&client_id=QW53F2FKVAB5HKQ1YXLYAJA1SFD44IK1MPJQEOG0SJS2G3BG&client_secret=N3Q3BIWDYRC03M5OFNTNEMR2ARFCX4YQOUYG3CDZ12WDVXMU&v=20180224".

6 Likes

Thanks for sharing this, video is misleading and was trying to figure out this for while now…

Thaks it worked for me aswel!!

Thank you very much, i was trying to figure this out for a long time. that video is very mis-leading

I’m on a mac. I’ve been using Safari. I got the same error. I tried on chrome. It worked on chrome.

I tried building the render weather HTML string from scratch. I couldn’t get the date.dt value (which was “1589560637”) to render as a date with const date1 = new Date(date.dt), as the hint suggested. It kept giving me Monday Jan 19 1970. Anybody know why? I gave up and used const date1 = new Date(); to get the current timestamp instead - which is also what the helper function written by codecademy does. How would I construct a Date object from the returned json object’s .dt property?

can someone send the video please? I don’t seem to have the option to look at the video for some reason?

2 Likes

Here you go buddy,

1 Like

Is the video misleading or good to learn from? In the project it doesn’t give me an option to see the video tutorial