Blog
Web design October 18, 2026

How to embed a playable game in an X post

A game can run right inside an X post: the thumbnail gets a play button, and pressing it starts the game in the timeline. Here’s how I got Drift Boss playing there, including the three things that went wrong first.

Can you put a playable game in an X post?

Yes. X calls it a player card. When a post links to a page with the right tags, X shows the link as a small thumbnail with a play button. Click it, and X loads a page you choose inside a frame in the post, so the game runs right in the timeline. On October 18, 2026, I got Drift Boss from the bushe.co games section playing inside an X post. It took three tries, and each failed try taught me something that lists of tags leave out.

How it works

You need two pages:

  • The share page. The link you post. It carries the player card tags in its HTML.
  • The player page. The page X loads into the post: just the game, filling the frame.

On x.com the game plays in the post. The X phone app may open the player page in its own browser instead. X decides which links get the player, and it can stop showing it at any time.

Step 1: Add the player card tags

Put these in the share page’s head. They have to be in the HTML your server sends, because X reads the page without running its JavaScript.

<meta name="twitter:card" content="player">
<meta name="twitter:site" content="@yourhandle">
<meta name="twitter:title" content="Play Drift Boss Free Online">
<meta name="twitter:description" content="One button. Don't fall off.">
<meta name="twitter:image" content="https://example.com/img/game-square.jpg">
<meta name="twitter:player" content="https://example.com/play/game/">
<meta name="twitter:player:width" content="480">
<meta name="twitter:player:height" content="480">
  • Use 480 × 480. My first try asked for a 1280 × 790 player and got a plain thumbnail with no play button. Tweetcraft, a Minecraft-style game that spread across X in October 2026, asks for 480 × 480, and so does Drift Boss now.
  • Use a square picture. X shows it as the thumbnail before anyone presses Play. Ours is a 675 × 675 crop of the game’s cover.
  • Keep your Open Graph tags. Other sites still read them, and they can keep the wide picture.

Step 2: Build the player page

The player page is bare: the game at full width and height, with no header or footer. Mine adds a 28-pixel bar at the bottom that links back to the game’s page on bushe.co. A few rules decide whether it works inside X:

  • Let x.com frame it. Don’t send an X-Frame-Options header. If your site sends a Content-Security-Policy, its frame-ancestors must include x.com and twitter.com.
  • Work inside X’s sandbox. X frames the page with sandbox="allow-popups allow-same-origin allow-scripts allow-presentation". Scripts and pop-ups work; form submits, alert boxes, pointer lock and changing the page around the post don’t. Open links in a new tab.
  • Fit small frames. The frame can be about 245 pixels wide in a narrow window and about 500 on a desktop, so the game has to scale.
  • Expect extra parameters. X adds ?autoplay=1&auto_play=true to the player URL.
  • Keep it out of search. Give it a noindex tag and a canonical link to the share page, so Google indexes the real page.

Step 3: Show something while the game loads

My second try got the play button, but clicking it showed a black frame. The game wasn’t broken; it was slow. Drift Boss comes from GameDistribution, whose embed first asks the page around it for a handshake. Nothing answers, so it waits before showing its splash screen: about 6 seconds in my tests and close to 30 on the live post. Most people would leave before then.

The fix is a loading screen over the frame with the game’s picture and “Loading Drift Boss…”. GameDistribution sends the page two messages right before its splash appears (parent-data-request and register_iframe_window_action), so the loading screen comes off when either one arrives, or after 30 seconds at most. Whatever your game is, show something in the first second.

One more catch with game hosts like GameDistribution: they lock each game to the sites you registered with them, so the player page has to live on that site. Open it from your own computer’s test server and you’ll see “not available here”.

Step 4: Test before you post

  1. Fetch the share page the way X does. Request it with the user agent Twitterbot/1.0, then check that every tag is there and the picture loads. Bot protection, like Cloudflare’s, mustn’t block it.
  2. Check the player page’s headers for X-Frame-Options and frame-ancestors.
  3. Frame it the way X does. Make a test page on another address that loads the player page at 480 × 480 with X’s sandbox, open it in a browser and wait 30 seconds. You should see the loading screen, then the game, and the game should start when you click it.

X’s own card documentation no longer loads on its developer site, so a real post is the only final test.

Step 5: Post a link X hasn’t seen

X saves the card for each link. If it read your page before the tags were right, posting the same link again can bring back the old card. Add something new to the end, like ?v=2, so X reads the page fresh. Working looks like a small thumbnail with a play button; click it and the game loads in the post.

If you change the player page later, test it in a private window. My browser kept the old player page for hours, because the CDN in front of bushe.co tells browsers to keep pages for four hours.

The three fixes, in short

  • No play button: the player was 1280 × 790. Switching to 480 × 480 with a square picture, then posting a fresh link, fixed it.
  • Black screen: the game host was waiting for a handshake. A loading screen that comes off when the game is ready fixed it.
  • Still black after that fix: the browser had saved the old player page. A private window showed the new one.

Want to see it? Drift Boss is the page I posted, and the games section has all 297 free games.

Frequently asked questions

Can you embed a playable game in an X post?

Yes, with an X player card. Tags on the page you link tell X to load a page of your choice inside the post, and pressing the play button on the thumbnail starts the game in the timeline.

Why doesn’t my X card show a play button?

Check that twitter:card is set to player, that the player URL uses HTTPS, and that the size is 480 by 480. Then post a link X hasn’t seen before, since X keeps the card it saved for each link.

Why is my game black inside the X post?

Usually it is still loading: some game hosts wait several seconds before drawing anything. Cover the frame with a loading screen, and make sure your site lets x.com load the player page in a frame.

Does it work in the X app?

On x.com the game plays inside the post. The X phone app may open the player page in its own browser instead of playing it in the timeline.

Do I need X’s approval?

Drift Boss played without any request to X. X still decides which links get the player, though, and it can stop showing it at any time.

Want your game playable on X?

I build the share page, the player page and the loading screen, then test them on a real post before you share it.

Get a quote

Keep reading