You can use
tweet components to embed tweets in an article. A
tweet component lets readers interact with social media content from inside an article.
You’ll place a
tweet component in the article’s
components array. For any
tweet component, the value of the
role property is
"tweet", and the value of the
URL property is the URL of the tweet that you want to embed.
For information on customizing
tweet components, see Tweet in the Apple News Format Reference.
JSON Example: Tweet Component
tweet component that is preceded by a heading.
noMarginLayout component layout objects were defined earlier in the tutorial.
...) indicate lines of code that have been omitted from this example.
"text": "TWEET HEADING"
At any time, you can try changing property values in your
article.json file, and then use News Preview to see how these changes impact the look of your article.
For example, try changing which tweet appears in your article:
In your code, find the
Replace the value of the component’s
"https://twitter.com/Urna_Semper/status/750424743417745408", with the URL to another tweet of your choice.
article.jsonfile in News Preview. See also: Updating Your Article Preview.
The article now shows the tweet that you chose.