> ## 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.

# 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](/zh-TW/reference/live/xsapi-c/types_c/handles/xblcontexthandle)

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

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

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

*socialRelationshipFilter*   \_In\_\
類型：[XblSocialRelationshipFilter](/zh-TW/reference/live/xsapi-c/social_c/enums/xblsocialrelationshipfilter)

控制清單的篩選方式。

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

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

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

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

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

呼叫者配置的 [XAsyncBlock](/zh-TW/reference/system/xasync/structs/xasyncblock)。

### 傳回值

類型：HRESULT

此 API 作業的 HRESULT 傳回碼。

## 備註

呼叫 [XblSocialGetSocialRelationshipsResult](/zh-TW/reference/live/xsapi-c/social_c/functions/xblsocialgetsocialrelationshipsresult) 以取得結果。

## REST 呼叫

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

## 需求

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

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

## 另請參閱

[social\_c](/zh-TW/reference/live/xsapi-c/social_c/social_c_members)


## Related topics

- [XblSocialGetSocialRelationshipsAsync](/reference/live/xsapi-c/social_c/functions/xblsocialgetsocialrelationshipsasync.md)
- [XblSocialGetSocialRelationshipsResult](/reference/live/xsapi-c/social_c/functions/xblsocialgetsocialrelationshipsresult.md)
- [Getting a social relationship](/services/xbox-services/community/people-system/how-to/live-getting-a-social-relationship.md)
