> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# XGameUiShowStateShareAsync

> XGameUiShowStateShareAsync

# XGameUiShowStateShareAsync

*Note that this method is a preview in the June 2024 GDK.*

This method shows a UI populated with metadata related to the state being shared and UX affordances for sharing the state either as a web link or a direct invite.

## Syntax

```cpp theme={null}
HRESULT XGameUiShowStateShareAsync(
  XAsyncBlock * async,
  XUserHandle requestingUser,
  const char * linkToken
)
```

### Parameters

*async*   \_In\_
Type: XAsyncBlock \*

A pointer to the [XAsyncBlock](/reference/system/xasync/structs/xasyncblock) that is passed to [XAsyncRun](/reference/system/xasync/functions/xasyncrun).

*requestingUser*   \_In\_\
Type: XUserHandle

A handle to the user that is sending the invites.

*linkToken*   \_In\_z\_\
Type: const char \*

A linkToken that references the state to be shared.

## Remarks

To share a state with UI, after creating a state and a corresponding link, the title should call the [XGameUiShowStateShareAsync](/reference/system/xgameui/functions/xgameuishowstateshareasync) API passing along the requesting user and the link token acquired as part of creating the link for the state. Using PlayFab is one way to create states and links, reach out to your Microsoft Representative for details.

## Requirements

**Header:** XGameUI.h

**Library:** xgameruntime.lib

**Supported platforms:** Windows, Steam Deck, XBOX One family consoles and XBOX Series consoles

## See also

[XGameUI members](/reference/system/xgameui/xgameui_members)


## Related topics

- [XGameUiShowStateShareResult](/reference/system/xgameui/functions/xgameuishowstateshareresult.md)
- [XGameUI](/reference/system/xgameui/xgameui_members.md)
- [XGameUiShowWebAuthenticationAsync](/reference/system/xgameui/functions/xgameuishowwebauthenticationasync.md)
- [XGameUiShowWebAuthenticationWithOptionsAsync](/reference/system/xgameui/functions/xgameuishowwebauthenticationwithoptionsasync.md)
- [XGameUiShowAchievementsAsync](/reference/system/xgameui/functions/xgameuishowachievementsasync.md)
