---
title: "SocialMediaPosting Schema"
description: "Add Schema.org SocialMediaPosting structured data to your Sanity-powered site with sanity-plugin-seofields. Mark up status updates, replies, and embedded social posts."
canonical: https://sanity-plugin-seofields.thehardik.in/docs/schema-org/social-media-posting
---

# SocialMediaPosting

The SocialMediaPosting schema type describes a single update on a social network — a tweet, status update, reply, or shared post. It is the right markup when republishing or embedding social content on your own pages.

## About SocialMediaPosting

SocialMediaPosting inherits from  Article  , so it accepts the same headline, author, and date fields. The distinguishing field is sharedContent — use it when the post quotes, reshares, or replies to another piece of content so search engines can model the conversation graph. Always set url to the canonical permalink on the source platform.

## Fields

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `headline` | string | Yes | Title or first line of the post. |
| `description` | text | No | Full text or summary of the social post. |
| `image` | url \| ImageObject | No | An image attached to the post. |
| `author` | url \| Person | No | The user who authored the post. |
| `publisher` | string \| object | No | The publisher of the post — either a URL string or an Organization object with name and logoUrl. |
| `datePublished` | datetime | No | When the post was published (ISO 8601). |
| `dateModified` | datetime | No | When the post was last modified (ISO 8601). |
| `sharedContent[].url` | url | No | URL of any shared / quoted content. |
| `sharedContent[].headline` | string | No | Headline or title of the shared / quoted content. |

## Plugin Registration

```typescript
import { defineConfig } from 'sanity'
import { schemaOrgSocialMediaPostingPlugin } from 'sanity-plugin-seofields/schema'

export default defineConfig({
  plugins: [
    schemaOrgSocialMediaPostingPlugin(),
  ],
})
```

## Schema Usage

Add the `schemaOrgSocialMediaPosting` field to any document schema:

```typescript
import { defineField, defineType } from 'sanity'

export default defineType({
  name: 'socialPost',
  title: 'Social Post',
  type: 'document',
  fields: [
    defineField({
      name: 'schemaOrgSocialMediaPosting',
      title: 'SocialMediaPosting Schema',
      type: 'schemaOrgSocialMediaPosting',
    }),
  ],
})
```

## GROQ Query

```javascript
*[_type == "socialPost"][0]{
  schemaOrgSocialMediaPosting {
    headline,
    description,
    image,
    author,
    publisher,
    datePublished,
    dateModified,
    sharedContent[] {
      url,
      headline
    }
  }
}
```

## Next.js Component

```tsx
import { SocialMediaPostingSchema } from 'sanity-plugin-seofields/schema/next'

export default function Page({ data }) {
  return <SocialMediaPostingSchema data={data.schemaOrgSocialMediaPosting} />
}
```

## JSON-LD Output

```json
{
  "@context": "https://schema.org",
  "@type": "SocialMediaPosting",
  "headline": "Just shipped a new version of sanity-plugin-seofields",
  "description": "Just shipped a new version of sanity-plugin-seofields with 14 new Schema.org types. Huge thanks to everyone who contributed feedback!",
  "image": "https://example.com/posts/release.jpg",
  "author": {
    "@type": "Person",
    "name": "Hardik Desai",
    "url": "https://thehardik.in"
  },
  "publisher": {
    "@type": "Organization",
    "name": "Tech Blog",
    "logo": {
      "@type": "ImageObject",
      "url": "https://example.com/logo.png"
    }
  },
  "datePublished": "2025-03-12T16:24:00Z",
  "dateModified": "2025-03-12T17:00:00Z",
  "sharedContent": {
    "@type": "WebPage",
    "url": "https://github.com/hrdtbs/sanity-plugin-seofields/releases/tag/v2.0.0",
    "headline": "sanity-plugin-seofields v2.0.0 Release"
  }
}
```
