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

# レピュテーション フィードバックの送信

> XBOX タイトルからポジティブまたはネガティブなプレイヤー レピュテーション フィードバックを送信するために XblSocialSubmitReputationFeedbackAsync を呼び出す XSAPI C の例です。

## 単一のレピュテーション フィードバックの送信

**C API**

```cpp theme={null}
auto asyncBlock = std::make_unique<XAsyncBlock>();
asyncBlock->queue = queue;
asyncBlock->callback = [](XAsyncBlock* asyncBlock)
{
    std::unique_ptr<XAsyncBlock> asyncBlockPtr{ asyncBlock }; // Take over ownership of the XAsyncBlock*
    HRESULT hr = XAsyncGetStatus(asyncBlock, false);
};

uint64_t xuid{ 123 };
HRESULT hr = XblSocialSubmitReputationFeedbackAsync(
    xboxLiveContext,
    xuid,
    XblReputationFeedbackType::PositiveHelpfulPlayer,
    nullptr,
    "Helpful player",
    nullptr,
    asyncBlock.get()
);
if (SUCCEEDED(hr))
{
    // The call succeeded, so release the std::unique_ptr ownership of XAsyncBlock* since the callback will take over ownership.
    // If the call fails, the std::unique_ptr will keep ownership and delete the XAsyncBlock*
    asyncBlock.release();
}
```

**リファレンス**

* [XAsyncBlock](https://docs.xbox.com/ja-jp/reference/system/xasync/structs/xasyncblock.md)
* [XAsyncGetStatus](https://docs.xbox.com/ja-jp/reference/system/xasync/functions/xasyncgetstatus.md)
* [XblReputationFeedbackType](https://docs.xbox.com/ja-jp/reference/live/xsapi-c/social_c/enums/xblreputationfeedbacktype.md)
* [XblSocialSubmitReputationFeedbackAsync](https://docs.xbox.com/ja-jp/reference/live/xsapi-c/social_c/functions/xblsocialsubmitreputationfeedbackasync.md)

## 複数のレピュテーション フィードバック アイテムの送信

**C API**

```cpp theme={null}
std::vector<XblReputationFeedbackItem> feedbackItems;
feedbackItems.push_back(XblReputationFeedbackItem
    {
        123,
        XblReputationFeedbackType::PositiveHelpfulPlayer,
        nullptr,
        "Helpful player",
        nullptr
    });
// Add any additional feedback items here

auto asyncBlock = std::make_unique<XAsyncBlock>();
asyncBlock->queue = queue;
asyncBlock->callback = [](XAsyncBlock* asyncBlock)
{
    std::unique_ptr<XAsyncBlock> asyncBlockPtr{ asyncBlock }; // Take over ownership of the XAsyncBlock*
    HRESULT hr = XAsyncGetStatus(asyncBlock, false);
};

HRESULT hr = XblSocialSubmitBatchReputationFeedbackAsync(
    xboxLiveContext,
    feedbackItems.data(),
    feedbackItems.size(),
    asyncBlock.get()
);
if (SUCCEEDED(hr))
{
    // The call succeeded, so release the std::unique_ptr ownership of XAsyncBlock* since the callback will take over ownership.
    // If the call fails, the std::unique_ptr will keep ownership and delete the XAsyncBlock*
    asyncBlock.release();
}
```

**リファレンス**

* [XAsyncBlock](https://docs.xbox.com/ja-jp/reference/system/xasync/structs/xasyncblock.md)
* [XAsyncGetStatus](https://docs.xbox.com/ja-jp/reference/system/xasync/functions/xasyncgetstatus.md)
* [XblReputationFeedbackItem](https://docs.xbox.com/ja-jp/reference/live/xsapi-c/social_c/structs/xblreputationfeedbackitem.md)
* [XblReputationFeedbackType](https://docs.xbox.com/ja-jp/reference/live/xsapi-c/social_c/enums/xblreputationfeedbacktype.md)
* [XblSocialSubmitBatchReputationFeedbackAsync](https://docs.xbox.com/ja-jp/reference/live/xsapi-c/social_c/functions/xblsocialsubmitbatchreputationfeedbackasync.md)


## Related topics

- [タイトルからのレピュテーション フィードバックの送信](https://docs.xbox.com/ja-jp/services/xbox-services/community/reputation/concepts/live-sending-reputation-feedback.md)
- [レピュテーションのサンプル コード](https://docs.xbox.com/ja-jp/services/xbox-services/community/reputation/how-to/live-reputation-howto-nav.md)
- [レピュテーションの概要](https://docs.xbox.com/ja-jp/services/xbox-services/community/reputation/live-reputation-overview.md)
- [レピュテーションの概念](https://docs.xbox.com/ja-jp/services/xbox-services/community/reputation/concepts/live-reputation-concepts-nav.md)
- [XBOX PC Toolbox](https://docs.xbox.com/ja-jp/tools/tools-pc/xboxpctoolbox/xboxpctoolbox.md)
