vercel / react-tweet

Embed tweets in your React application.

Home Page:https://react-tweet.vercel.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Tweet not found

XahidEx opened this issue · comments

Tweet not found, even though It exist. No tweets are being rendered.
image

Same here, it's only happened on Vercel, local it's fine.

Same here, it's only happened on Vercel, local it's fine.

Seems like a CORS issue 🥱

Getting the same here. Working locally, not working on Vercel

Edit: could it be related to this thread?

It works on localhost and vercel edge.
My guess is that cdn.syndication.twimg.com where the tweets are fetched from, might be blocking some vercel / AWS IP ranges.

A workaround is:

  • get the tweet json from https://react-tweet.vercel.app/api/tweet/${tweet_id}
  • store the file locally in order to avoid future cdn.syndication.twimg.com outages on build time
  • use <EmbeddedTweet tweet={tweet_json.data} /> instead of <Tweet id={id}/>

Check the solution: #137 (comment)