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

# XblSocialGetSocialRelationshipsAsync

> XblSocialGetSocialRelationshipsAsync

# XblSocialGetSocialRelationshipsAsync

取得與呼叫者有社交關聯的人員清單。

## 語法

```cpp theme={null}
HRESULT XblSocialGetSocialRelationshipsAsync(  
         XblContextHandle xboxLiveContext,  
         uint64_t xboxUserId,  
         XblSocialRelationshipFilter socialRelationshipFilter,  
         size_t startIndex,  
         size_t maxItems,  
         XAsyncBlock* async  
)  
```

### 參數

*xboxLiveContext*   \_In\_\
類型：[XblContextHandle](https://docs.xbox.com/zh-TW/reference/live/xsapi-c/types_c/handles/xblcontexthandle.md)

使用 XblContextCreateHandle 建立的 Xbox Live 內容控制代碼。

*xboxUserId*   \_In\_\
類型：uint64\_t

要取得其社交關係的 XBOX 使用者識別碼。

*socialRelationshipFilter*   \_In\_\
類型：[XblSocialRelationshipFilter](https://docs.xbox.com/zh-TW/reference/live/xsapi-c/social_c/enums/xblsocialrelationshipfilter.md)

控制清單的篩選方式。

*startIndex*   \_In\_\
類型：size\_t

控制結果清單的起始索引。

*maxItems*   \_In\_\
類型：size\_t

結果清單可包含的項目數目上限。傳入 0 以嘗試擷取所有項目。

*async*   \_In\_\
類型：XAsyncBlock\*

呼叫者配置的 [XAsyncBlock](https://docs.xbox.com/zh-TW/reference/system/xasync/structs/xasyncblock.md)。

### 傳回值

類型：HRESULT

此 API 作業的 HRESULT 傳回碼。

## 備註

呼叫 [XblSocialGetSocialRelationshipsResult](https://docs.xbox.com/zh-TW/reference/live/xsapi-c/social_c/functions/xblsocialgetsocialrelationshipsresult.md) 以取得結果。

## REST 呼叫

V1 GET /users/{ownerId}/people?view={view}\&startIndex={startIndex}\&maxItems={maxItems}

## 需求

**標頭：** social\_c.h

**程式庫：** Microsoft.Xbox.Services.14x.GDK.C.lib

## 另請參閱

[social\_c](https://docs.xbox.com/zh-TW/reference/live/xsapi-c/social_c/social_c_members.md)


## Related topics

- [XblSocialGetSocialRelationshipsResult](https://docs.xbox.com/zh-TW/reference/live/xsapi-c/social_c/functions/xblsocialgetsocialrelationshipsresult.md)
- [XblSocialRelationshipFilter](https://docs.xbox.com/zh-TW/reference/live/xsapi-c/social_c/enums/xblsocialrelationshipfilter.md)
- [social_c](https://docs.xbox.com/zh-TW/reference/live/xsapi-c/social_c/social_c_members.md)
- [XblSocialRelationshipResultGetTotalCount](https://docs.xbox.com/zh-TW/reference/live/xsapi-c/social_c/functions/xblsocialrelationshipresultgettotalcount.md)
- [XblSocialRelationshipResultGetNextAsync](https://docs.xbox.com/zh-TW/reference/live/xsapi-c/social_c/functions/xblsocialrelationshipresultgetnextasync.md)
