Closed benjamin852 closed 3 years ago
Sorry after some more testing I realized I was misusing the /api function completely wrong. For any other noobies you literally have to treat it as an api route not just another function in repo. The get req is working fine closing this.
Hi.
I am trying to make a simple get request on a tweet but I keep getting
I know this request should not be done on the browser but I am doing it in a nextjs app in the pages/api directory, which I thought was an acceptable place to interact with the api?
Here is my code super basic so not sure where I went wrong.
In pages/api/twitter.js
Then in my component I have
Thanks for the help and for making this awesome library.