Guides and Sample Code

Developer

Apple News Format Reference

On This Page

Facebook Post

Embed a Facebook post into an article.

Required Properties

Property and type

Description

Version

role

String

This component always has the role facebook_post.

1.2

URL

String

The URL of the Facebook post you want to embed. URLs for Facebook posts must include the identifier for the post.

Following is an example of a Facebook post URL: https://www.facebook.com/applemusic/posts/1372231696125877.

Following is a list of supported URL formats for Facebook posts:

  • https://www.facebook.com/{page-name}/posts/{post-id}

  • https://www.facebook.com/{username}/posts/{post-id}

  • https://www.facebook.com/{username}/activity/{activity-id}

  • https://www.facebook.com/photo.php?fbid={photo-id}

  • https://www.facebook.com/photos/{photo-id}

  • https://www.facebook.com/permalink.php?story_fbid={post-id}

1.2

Optional Properties

Property and type

Description

Version

anchor

Anchor

An anchor object that aligns this component with another component.

1.0

identifier

String

A unique identifier for this component. If used, identifier must be unique across the entire document. An identifier is required if you want to anchor other components to this component. See Anchor.

1.0

layout

Component Layout/String

Either an inline component layout object that contains layout information, or a string reference to a component layout that is defined at the top level of the document.

  • If layout is not defined, size and position will be based on various factors, such as the device type, the length of the content, and the role of this component.

1.0

style

Component Style/String

Either an inline component style object that defines the appearance of this component, or a string reference to a component style that is defined at the top level of the document.

1.0

Facebook Post Component Example

  1. {
  2. "role": "facebook_post",
  3. "URL": "https://www.facebook.com/applemusic/posts/1372231696125877"
  4. }