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

# XblSocialRelationship

> XblSocialRelationship

# XblSocialRelationship

表示该用户与其他 XBOX 用户之间的关系。

## 语法

```cpp theme={null}
typedef struct XblSocialRelationship {  
    uint64_t xboxUserId;  
    bool isFavorite;  
    bool isFriend;  
    bool isFollowingCaller;  
    const char** socialNetworks;  
    size_t socialNetworksCount;  
} XblSocialRelationship  
```

### 成员

*xboxUserId*\
类型：uint64\_t

该人物的 XBOX 用户标识符。

*isFavorite*\
类型：bool

指示该人物是否是用户更关心的对象。由于用户的人物列表中可能有大量人物，因此在体验中应优先显示收藏的人物，并将其显示在其他非收藏人物之前。

*isFriend*\
类型：bool

指示该用户与其他 XBOX 用户之间是否存在相互关注/被关注的关系。

*isFollowingCaller*\
类型：bool

不反映关注者/被关注关系，目前保留是出于向后兼容性目的。此字段的值由 XblSocialRelationship 中 'isFriend' 的值决定。

*socialNetworks*\
类型：const char\*\*

以 UTF-8 编码的字符串集合，指示该人物与哪些社交网络存在关系。

*socialNetworksCount*\
类型：size\_t

socialNetworks 数组中社交网络字符串的数量。

## 参数属于

[XblSocialRelationshipResultGetRelationships](/reference/live/xsapi-c/social_c/functions/xblsocialrelationshipresultgetrelationships)

## 要求

**头文件：** social\_c.h

## 另请参阅

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