Get social media posting

Action ID
actions.intent.GET_SOCIAL_MEDIA_POSTING
Description
View a post or broadcast user message in a social media app. Filter posts by topic description using the socialMediaPosting.about.description intent parameter and present the most relevant ones to the user. Determine the author of the post using the socialMediaPosting.author.name intent parameter, if available. To determine the type of post, you can use the socialMediaPosting.disambiguatingDescription intent parameter.

Locale support

Functionality Locales
Preview creation using App Actions test tool en-US
User invocation from Google Assistant en-US

Example queries

The following fields represent essential information that users often provide in queries that trigger this built-in intent:

socialMediaPosting.about.description
socialMediaPosting.author.name

Other supported fields

The following fields represent information that users often provide to disambiguate their needs or otherwise improve their results:

socialMediaPosting.@type
socialMediaPosting.about.@type
socialMediaPosting.author.@type
socialMediaPosting.disambiguatingDescription

Android Slices

We recommend implementing Android Slices for this built-in intent. An Android Slice presents information or interaction options from your app to improve user engagement in the Google Assistant.

Supported text values by field





Inventory availability by field


Sample actions.xml

For information about the actions schema, read Create actions.xml.

Handle intent parameters as URL parameters

<?xml version="1.0" encoding="utf-8"?>
<!-- This is a sample actions.xml -->
<actions>
  <action intentName="actions.intent.GET_SOCIAL_MEDIA_POSTING">
    <fulfillment urlTemplate="myapp://custom-deeplink{?disambiguatingDescription,name,description}">
      <!-- Eg. disambiguatingDescription = "Feed" -->
      <!-- (Optional) Require a field eg.disambiguatingDescription for fulfillment with required="true" -->
      <parameter-mapping urlParameter="disambiguatingDescription" intentParameter="socialMediaPosting.disambiguatingDescription" required="true" />
      <!-- Eg. name = "John Doe" -->
      <parameter-mapping urlParameter="name" intentParameter="socialMediaPosting.author.name" />
      <!-- Eg. description = "Event" -->
      <parameter-mapping urlParameter="description" intentParameter="socialMediaPosting.about.description" />
    </fulfillment>

    <!-- Provide a fallback fulfillment with no required parameters. For example, to your app search or router deeplink -->
    <fulfillment urlTemplate="myapp://deeplink" />
  </action>
</actions>

Use web inventory to discover URLs for fulfillment

socialMediaPosting.author.name is a field that supports web inventory. In the following example, Google Assistant performs a web search for the user query and determines the fulfillment URL. Assistant filters for search results that match the provided urlFilter value of https://www.mywebsite.com/link1/.*.

<?xml version="1.0" encoding="utf-8"?>
<!-- This is a sample actions.xml -->
<actions>
  <action intentName="actions.intent.GET_SOCIAL_MEDIA_POSTING">
    <!-- Use URL from entity match for deep link fulfillment -->
    <!-- Example: url = 'https://www.mywebsite.com/link1/item1' -->
    <fulfillment urlTemplate="{@url}" />

    <!-- Provide a fallback fulfillment with no required parameters. For example, to your app search or router deeplink -->
    <fulfillment urlTemplate="myapp://deeplink" />

    <!-- Define parameters with web inventories using urlFilter -->
    <parameter name="socialMediaPosting.author.name">
      <entity-set-reference urlFilter="https://www.mywebsite.com/link1/.*" />"/>
    </parameter>
  </action>
</actions>

JSON-LD sample

The following JSON-LD sample provides some example values that you can use in the App Actions test tool:

{
  "@context": "http://schema.org",
  "@type": "SocialMediaPosting",
  "about": {
    "@type": "Thing",
    "description": "Event"
  },
  "author": {
    "@type": "Person",
    "name": "John Doe"
  },
  "disambiguatingDescription": "Feed"
}