GitShow/vercel/react-tweet
vercel

react-tweet

Embed tweets in your React application.

by vercel
Star on GitHubForkWebsitenpm

TypeScript

1.9k stars117 forks24 contributorsQuiet · 2mo agoSince 2023react-tweet@3.3.1MIT

Meet the team

See all 24 on GitHub →
lfades
lfades139 contributions
github-actions[bot]Bot
github-actions[bot]25 contributions
tywayne
tywayne14 contributions
StefKors
StefKors4 contributions
leerob
leerob3 contributions
joulev
joulev3 contributions
garutyunov
garutyunov2 contributions
waruhachi
waruhachi1 contribution

Languages

View on GitHub →
TypeScript59.2%
MDX21%
CSS14.3%
JavaScript5.2%
HTML0.3%

Commit activity

Last 12 weeks · 2 commits

Full graph →

Community health

2 of 6 standards met

Community profile →
50
✓README✓License○Contributing○Code of Conduct○Issue Template○PR Template

Recent PRs & issues

Quiet · Last activity 2mo ago
See all on GitHub →
BankkRoll
Bug: Profile images 404 due to Twitter/X avatar URL suffix/hash changesOpenIssue

Profile images 404 due to Twitter/X avatar URL suffix/hash changes Note: This only affects past tweets. Tweets posted after an avatar update will use the new image and render correctly. Old tweets using the old will never automatically update. Description When embedding tweets, profile images can return a 404 because the from Twitter’s syndication API points to a stale asset. currently renders the URL directly from the syndication response, so once the old asset is purged, the embed shows a broken avatar. Example Steps to Reproduce 1. Pick a personal / non-gold-check account and embed one of its tweets using . 2. Confirm the profile image renders correctly. 3. Upgrade the account to a verified business / gold-check account. 4. After the gold check is applied, reload the embed. 5. Observe that the old now returns a 404 and the avatar is broken. Expected Behavior Avatars should always render, even if Twitter rotates the asset hash or updates the profile image. The component should ensure the latest avatar is displayed for past tweets, not just the version at the time of posting. Actual Behavior Avatar requests fail with 404 for old suffix/hash. The tweet embed shows a broken profile image. Using URL suffix manipulations would only load the avatar that existed when the tweet was posted, not the latest profile image. Current Workaround / Fallback Currently, we bypass this issue by overriding the default avatar component in . Our custom component () renders the original profile image URL, and if it 404s, it falls back to a known working image for the account. Limitations:** Without a dynamic latest-avatar fetch, past tweets still risk pointing to stale images if the account updates its avatar again. Manual updates to the fallback image are currently required to ensure the latest avatar is displayed.

BankkRoll · 2w ago

Recent fixes

View closed PRs →
highoncomputers
fix: replace _normal avatar URL suffix to prevent 404sMergedPR

Twitter's CDN often purges _normal-suffixed profile images, causing avatars in embedded tweets to return 404. This replaces the suffix with which references a more stable CDN asset path. Changes Added utility in that replaces the suffix with in Twitter CDN URLs Applied the normalization in the component so all rendered avatars benefit Closes #201

highoncomputers · 1mo ago
JamesSingleton
fix(entities): safeguard entities not being definedMergedPR

This does what #219 does to fix #218 but a little safer due to the comment that entities was completely undefined by one person.

JamesSingleton · 2mo ago
7IBO
fix: handle missing entity fields from X syndication APIMergedPR

Problem The X syndication API omits , , , and when a tweet has none of those entities, instead of returning empty arrays. This causes to pass to , which crashes with: This affects any tweet that has no hashtags, mentions, URLs, or symbols (e.g. text + image only tweets). Example tweet that reproduces the issue: https://x.com/RiotPhroxzon/status/2056998824779079835 Response from the syndication API for this tweet: Note the absence of , , , and fields. Fix Add fallback when passing entity arrays to in Add default parameter value in as an additional safety net Fixes #218

7IBO · 2mo ago
Structured data for AI agents

Repository: vercel/react-tweet. Description: Embed tweets in your React application. Stars: 1881, Forks: 117. Primary language: TypeScript. Languages: TypeScript (59.2%), MDX (21%), CSS (14.3%), JavaScript (5.2%), HTML (0.3%). License: MIT. Homepage: https://react-tweet.vercel.app Latest release: react-tweet@3.3.1 (2mo ago). Open PRs: 4, open issues: 42. Last activity: 2mo ago. Community health: 50%. Top contributors: lfades, github-actions[bot], tywayne, StefKors, leerob, joulev, garutyunov, waruhachi, ryoppippi, ryoid and others.

·@ofershap

Replace github.com with gitshow.dev