Tweet
The component for adding a Tweet that was posted to Twitter.
Declaration
object TweetProperties
| Name | Type | Description |
|---|---|---|
role Required | string | Always |
URL Required | uri | The URL of the tweet you want to embed. Apple News supports the following URL formats for tweets:
The query parameters are optional. |
anchor | Anchor | An object that defines vertical alignment with another component. |
animation | (ComponentAnimation | string("none")) | An object that defines an animation you apply to the component. Use the |
behavior | (Behavior | string("none")) | An object that defines behavior for a component, like Parallax or Springy. Use the |
conditional | (ConditionalComponent | [ConditionalComponent]) | An instance or array of component properties that you can apply conditionally, and the conditions that cause Apple News Format to apply them. |
hidden | boolean | A Boolean value that determines whether the component is hidden. |
identifier | string | An optional unique identifier for this component. If you use |
layout | (ComponentLayout | string) | An inline If you don’t define |
style | (ComponentStyle | string | string("none")) | An inline Use the |
Discussion
Use the Tweet object to include a Tweet from Twitter by specifying a URL for the tweet.
Example
{
"components": [
{
"role": "title",
"text": "Apple News App"
},
{
"role": "body",
"format": "html",
"text": "Apple News Format allows publishers to craft beautiful editorial layouts. Galleries, audio, video, and fun interactions like animation make stories spring to life."
},
{
"role": "heading2",
"text": "Tweet"
},
{
"role": "tweet",
"URL": "https://twitter.com/AppleNews/status/1057007167679664128"
}
]
}