<!--
{
  "documentType" : "article",
  "framework" : "AppleNews",
  "identifier" : "/documentation/AppleNews/adding-a-tweet",
  "metadataVersion" : "0.1.0",
  "role" : "article",
  "title" : "Adding a Tweet"
}
-->

# Adding a Tweet

Include a tweet in an article.

## Discussion

A `tweet` component lets users see social media content in an article.

**On this page, you’ll learn how to use a tweet component to embed a tweet in an article.**

### Add a Tweet in Your Article

In <doc://com.apple.applenews/documentation/AppleNews/positioning-text-components>, you created some `ComponentLayout` objects. You’ll refer to those `ComponentLayout` objects in this code.

1. Copy the example code <doc://com.apple.applenews/documentation/AppleNews/adding-a-tweet#Tweet-Copy-This-Code>.
2. Paste the code inside in the `components` array of your article, after the last component and before the closing square bracket (`]`) at the end of the array.

Your code should look like the example code <doc://com.apple.applenews/documentation/AppleNews/adding-a-tweet#Tweet-Result>.

After you make this change in your code, you can preview your working `article.json` file in News Preview to see a tweet in your article.

#### Tweet: Copy This Code

```json
,
    {
      "role": "heading2",
      "layout": "fullMarginAboveHalfBelowLayout",
      "text": "TWEET HEADING"
    },
    {
      "role": "tweet",
      "layout": "noMarginLayout",
      "URL": "https://twitter.com/Urna_Semper/status/1480968065630285834"
    }
```

#### Tweet: Result

Ellipses (`...`) indicate lines of code that have been omitted from this example.

```json
{
  ...
  "components": [
    ...
    {
      "role": "heading2",
      "layout": "fullMarginAboveHalfBelowLayout",
      "text": "TWEET HEADING"
    },
    {
      "role": "tweet",
      "layout": "noMarginLayout",
      "URL": "https://twitter.com/Urna_Semper/status/1480968065630285834"
    }
  ],
  ...
}
```

### Further Exploration

At any time, you can try changing property values in your `article.json` file and then use News Preview to see how these changes affect the look of your article.

For example, try changing which tweet appears in your article:

1. In your `article.json` file, find the `tweet` component.
2. Replace the value of the component’s `URL` property (`"https://twitter.com/Urna_Semper/status/1480968065630285834"`) with the URL to another tweet.
3. Preview your `article.json` file in News Preview.

The article now shows the tweet that you chose.

### Previous

<doc://com.apple.applenews/documentation/AppleNews/adding-a-mosaic-of-images>

### Next

<doc://com.apple.applenews/documentation/AppleNews/adding-a-podcast>

## See Also

[`object Tweet`](/documentation/AppleNewsFormat/Tweet)

The component for adding a Tweet that was posted to Twitter.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)