The component for adding an Instagram post.
Declaration
object InstagramProperties
| Name | Type | Description |
|---|---|---|
role Required | string | Always |
URL Required | uri | The URL of the Instagram post you want to embed. Apple News supports the following URL formats for Instagram posts:
|
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 instagram object to include an Instagram post by specifying a URL for the post.
Example
{
"components": [
{
"role": "title",
"text": "iTunes"
},
{
"role": "body",
"text": "iTunes is the best way to organize and enjoy the music, movies, and TV shows you already have — and shop for the ones you want."
},
{
"role": "heading2",
"text": "Instagram"
},
{
"role": "instagram",
"URL": "https://www.instagram.com/p/BpiRTBYlkY5/"
}
]
}