Search code examples
twitternext.jsreal-time

Twitter API with Next.js


I am using Twit in Next.js. So when user passes authorization from my app, he sends and api request to Next.js (access_token, access_secret) then i start Twitter streaming, to fetch tweets in real time. Everything works fine, but when i Deploy to Vercel, api call works, also i am returning stream object with response to be sure that streaming object is initialized, but in deployed version it still doesnt work, but in localhost or with ngrok works perfectly.


Solution

  • There is showing no error, after long investigation i found that Twitter Api can not work properly because of client and server timestamps. So in vercel i couldn't change server's timestamp, moved server to heroku it works perfectly.