> ## 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](/zh-TW/reference/live/xsapi-c/social_c/functions/xblsocialrelationshipresultgetrelationships)

## 需求

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

## 另請參閱

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


## Related topics

- [XblSocialRelationshipResultGetRelationships](/zh-TW/reference/live/xsapi-c/social_c/functions/xblsocialrelationshipresultgetrelationships.md)
- [XblSocialRelationshipResultGetNextAsync](/zh-TW/reference/live/xsapi-c/social_c/functions/xblsocialrelationshipresultgetnextasync.md)
- [取得社交關係](/zh-TW/services/xbox-services/community/people-system/how-to/live-getting-a-social-relationship.md)
- [XblSocialRelationshipFilter](/zh-TW/reference/live/xsapi-c/social_c/enums/xblsocialrelationshipfilter.md)
- [XblSocialRelationshipResultDuplicateHandle](/zh-TW/reference/live/xsapi-c/social_c/functions/xblsocialrelationshipresultduplicatehandle.md)
